inheritance and shared_ptr (2)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

inheritance and shared_ptr (2)

Pierre Salmon
  Hello,

My last question is not good, I reformulate it :

In this example :

class A {...}
class B : public A {...}

// Simple function
void GetElem(boost::shared_ptr<A> ele) {...}

luabind::scope Register () {
    return class_<A, boost::shared_ptr<A> >("A"),
        class_<B, A, boost::shared_ptr<B> >("B"),
        def("GetElem", &GetElem) ;
}

The following code in Lua is correct ?
b = B()
GetElem(b)

Thank

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user