Hi,

Being a newbie to boost::python, I have a  question ( hopefully
simple), which failed to find the answer in mail logs:

let's say
a.  I have a  C++ class, derived from boost::python::dict ;
b.  I would like later to get access to myLong, and to the dictionary,
my class derived from.

Would mentioning the boost::python::dict as a base wtihin wrapping
section be enough to get access to dictionary?
(Something like...
"
....
class myd :boost::python::dict {
...
  public:
     unsigned long myLong;
}

BOOST_PYTHON_MODULE(mymod)
{
   using namespace boost::python;

   class_<myd, bases<dict> > ("mydict")
                         .def_readwrite("pd", &myd::pd);
   ...
}       

Thanks.

Michael.
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to