[C++-sig] def() vs. add_property()

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Jul 16 18:15:31 CEST 2003

--- Stefan Seefeld <stefan.seefeld at orthosoft.ca> wrote:
> However, I'd rather like to make the origin accessible
> as a (read-only) property. The problem is that the
> 'add_property' method doesn't take a return value policy,
> so I have no way of telling python how to wrap the pointer.

make_getter supports return-value policies:

        .add_property("origin", make_getter(&Event::origin,


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

More information about the Cplusplus-sig mailing list