lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Thanks Renato...

I had a look into CORBA ... got pretty interested.. and then my head

It seems that this is very powerful method, though, also rather time
consuming... I was surprised at the amount of code in LuaOrb...

If I am mistaken on the complexity, I would like to know... what it seems to
me is that you generate some crazy IDL link between your C++ code and
LuaOrb... and that this process isn't _automated_ ?????

I really like the automated tolua program.. it gave me excellent results...
the problems I had being:

Having to keep seperate files (header,pkg) synced up...
Having to run an external program to generate the binding code
Having to adjust this automatically generated code (slightly)
If you wrap any amount of code using this method.. that is A LOT of code...
my dll was getting huge...

C++ is great if you are using only C++ it seems :)  Making a callback is
insanely difficult... Templates!  ARGH!  :)

Where I am currently at.. is I found a really cool C++ callback system (I
started with the RHickey link given on this list.. that got me so far but
not far enough)...

I am writing a program to automatically generate all possible calling stubs
for all variable types... coupled with a custom "framestack".. this better
work!  After 6 years I don't want to move back to C.. :)


----- Original Message -----
From: "Renato Cerqueira" <>
To: "Multiple recipients of list" <>
Sent: Tuesday, February 06, 2001 5:11 PM
Subject: Re: RTTI

> Hi Joshua,
> You may find these papers interesting:
> Regards,
> Renato
> --
> ------------------------------------------------------------------------
> Renato Cerqueira, Ph.D.             email:
> Research Staff Member            
> Tecgraf/PUC-Rio, Brazil   
> On leave at:
> Systems Software Research Group
> 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
> > 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*
> > 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
> > 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
> > and call the appropriate function?
> >
> > Thanks!
> > -J