[prev in list] [next in list] [prev in thread] [next in thread]
List: python-cpp-sig
Subject: Re: [C++-sig] copy constructors and multiple instances
From: Hans Meine <hans_meine () gmx ! net>
Date: 2011-09-02 8:24:17
Message-ID: 201109021024.17490.hans_meine () gmx ! net
[Download RAW message or body]
Am Freitag, 2. September 2011, 04:31:24 schrieb Josh Stratton:
> BOOST_PYTHON_MODULE(scene)
> {
> class_<Scene, boost::noncopyable>("Scene");
> }
>
> // later calling this
> boost::python::register_ptr_to_python< boost::shared_ptr<Scene> >();
> PyImport_AppendInittab("scene", &initscene);
>
> So is this all I really need for the mapping then?
register_ptr_to_python deals with the boost::shared_ptr around a Scene, but of
course you still need a converter for the latter, e.g. as registered by using
class_ to describe your class.
HTH
Hans
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic