[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to bind inherited C++ classes?
- From: Wesley Smith <wesley.hoke@...>
- Date: Sat, 31 Dec 2011 14:29:09 -0800
There are so many ways to approach the problem. If you want to learn
how to do it yourself, I would start simple and bind a single C++
class to work out all of the issues. Then you'll see potential
pitfalls in binding an inheritance hierarchy and can try out different
strategies that are appropriate for your situation.
On Sat, Dec 31, 2011 at 1:06 PM, Michael Kirsch <firstname.lastname@example.org> wrote:
> On Sat, Dec 31, 2011 at 6:28 AM, liam mail <email@example.com> wrote:
>> On Saturday, 31 December 2011, Michael Kirsch <firstname.lastname@example.org> wrote:
>>> How do I bind C++ classes to Lua so that when I try to convert a Lua
>>> object to a C++ class, it succeeds even if the object contains a C++
>>> class that's derived from the one I want?
>> Without trying to sound facetious, use an already available library which
>> provides this functionality. If that is not what you want the Lua authors
>> and others have a number of articles, for example in Game Programming Gems.
> I might check that out, but I would also like ot understand how to do
> it. I searched online and couldn't really find anything, which is
> strange, since it seems like it would be a common problem.