[C++-sig] exposing properties with getters and setters
david.abrahams at rcn.com
Wed Jun 26 02:07:59 CEST 2002
----- Original Message -----
From: "Achim Domma" <achim.domma at syynx.de>
To: "C++-Sig at Python. Org" <c++-sig at python.org>
Sent: Sunday, June 23, 2002 12:37 PM
Subject: [C++-sig] exposing properties with getters and setters
> what is the correct way to expose properties in boost.python V2, if I
> function pair for getting and setting the property? Can/Should I use
No, that's a v1 idiom
> or something else?
Yes, something else.
> I tried to use add_property,
> but it expects two handles, not functionpointers. The only example I
> was iterator.cpp, but I didn't understand it.
You can use make_function() to create a callable Python object from a
function or member function pointer, so:
More information about the Cplusplus-sig