Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Python: wrapping OpenSceneGraph smart pointers, again
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-10-14 19:23:33


On Tue, Oct 13, 2009 at 7:34 PM, Randolph Fritz <rfritz333_at_[hidden]> wrote:
> What is wrong with the following code?  I suspect I'm doing something
> silly, and I suspect the answer is obvious.
>
>  #include <osg/Node>
>  #include <osg/ref_ptr>
>
>  #include <boost/python.hpp>
>  #include <boost/python/pointee.hpp>
>
>  using namespace osg;
>  typedef ref_ptr<Node> NodePtr;
>
>  using namespace boost::python;
>
>  BOOST_PYTHON_MODULE(NodePtr) {
>    class_<NodePtr, pointee<NodePtr> >("NodePtr")
>      ;
>  }

Boost.Python knows Boost and TR1 smart pointers, not any others. If
you are using any others (ref_ptr in this case I gather) then you need
to make Boost.Python aware of it, I am not sure how, reading through
the code might reveal how.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net