Hi, I will use a shared pointer to my Python script
I expose my class : 
class_<handler::Target, boost::shared_ptr<handler::Target> >("Target")
     .def("getRadius", &handler::Target::getRadius)
     .def("setRadius", &handler::Target::setRadius)
     .def("setPosition", &handler::Target::setPosition)
    ;  and I use a method "getTestTarget" who return a shared pointer on my 
member variable vgd::Shp<vgSofa::handler::Target> 
InterfaceScriptBoost::getTestTarget()
{
      return UlisBoost::m_testTarget;
}
  And the exposition of is methode is :  def("getTestTarget", 
&dtUlis::InterfaceScriptBoost::getTestTarget, 
python::return_value_policy<python::reference_existing_object>());
  I want to know if it is true ? Any help would be appreciated, thank you       
                                  
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to