lua-users home
lua-l archive

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


On Tue, Feb 1, 2011 at 12:02, Eric Clark <eclark@ara.com> wrote:
> Unfortunately, C/C++ code is a requirement. We use Lua in our program to allow Lua scripting of many methods and functions that reside inside of our framework. Basically, we have an inheritance structure that looks like this:
>
>           Object
>                |
>            Entity
>          |           |
> Model         PropertySet
>

PiL2 has a whole chapter 16 devoted to OOP, discussing both single
inheritance and multiple inheritance. You can manually mirror your C++
hierarchy shown above in Lua. If you want an automatic way of matching
inheritance trees, you might try tolua++, swig or other Lua binding
generators. This list has had discussions about them recently.

--Leo--