Re: class hierarchies and smart pointers
David Raulo <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 17 Aug 2009 12:06:16 +0200 David Raulo <[email protected]> wrote: > Hi, > > I have a class hierarchy whose instances need to be managed with a > smart pointer Holder<> when passed to/from lua. So I declared the > classes like this: > class_<Base, Holder<Base> >("Base"); > class_<Derived, Holder<Base> >("Derived"); > > The problem is I also have functions like : > Holder<Derived> foo() > > and I really need to access the result as a Derived instance. > Luabind complains at runtime that Holder<Derived> is not registered. > I'm curious to know if anyone on the list faced this, and of course > how they solved it :) Thanks! So, anybody knows? Thanks - David ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july