[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: RTTI
- From: Renato Cerqueira <rcerq@...>
- Date: Tue, 06 Feb 2001 17:11:33 -0600
Hi Joshua,
You may find these papers interesting:
http://www.tecgraf.puc-rio.br/luaorb/pub/doa99.ps.gz
http://www.tecgraf.puc-rio.br/luaorb/pub/iccl98.ps.gz
Regards,
Renato
--
------------------------------------------------------------------------
Renato Cerqueira, Ph.D. email: rcerq@tecgraf.puc-rio.br
Research Staff Member rcerq@cs.uiuc.edu
Tecgraf/PUC-Rio, Brazil http://www.tecgraf.puc-rio.br/~rcerq
On leave at:
Systems Software Research Group http://choices.cs.uiuc.edu
Department of Computer Science
University of Illinois at Urbana-Champaign
------------------------------------------------------------------------
Joshua Ritter wrote:
>
> Ok.. I am pretty new to Lua...
>
> I have an extensive RTTI information system built into my cpp class
> hierarchy. This includes the variables that make up the class (for
> serialization primarily) and also the classes functions.. return
> type/parameter types/ and a functor (function pointer) to the associated
> function...
>
> Following the example of how toLua generates bindings... I am teaching my
> system to automatically bind these classes to Lua... it is working
> fabulously...
>
> I have run into a small snag however...
>
> All function tags callback to the same static int luacallback(lua_State* ls)
> function I have defined... what I need to get from here is:
>
> A) the "class" of the table
> B) the _name_ of the field (function)
>
> so a table of "type" cpClass with a function called setName.. called from
> Lua as:
>
> class = cpClass:new()
> class:setName("whewp")
>
> would end up in the callback static int luacallback(lua_State* ls)
>
> How do I get the cpClass and the setName here so I can match the arguments
> and call the appropriate function?
>
> Thanks!
> -J