[C++-sig] Py++: Exposing complex pointer members
Anand, Kumar
kanand at qualcomm.com
Fri Feb 23 07:33:04 CET 2007
PY++ exposes class attributes that are 'pointers to complex types'
automatically. But I see that it doesn't expose the 'setter' and only
exposes the 'getter'. Why? Is their a way to control it and have it
expose the setter as well?
Right now I am manually adding the following registration code to expose
both the setter and getter:
.add_property("payload",bp::make_getter(&Pkt::payload,
bp::return_internal_reference<1> ()),
bp::make_setter(&Pkt::payload,
bp::return_internal_reference<1> ()))
where 'payload' is a pointer to some complex type inside the 'Pkt'
class.
Thanks
Kumar
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070222/e8a6b6aa/attachment.htm>
More information about the Cplusplus-sig
mailing list