Hello,

Suppose that I have a class A with a member of type std::pair, called a. If I want to expose class A to python while allowing read/write access to the object pointed to by a.first, what to I put in def_readwrite?

I tried something like class<A>("A").def_readwrite("a", &A::a::first); but it doesn't work. Also been trying with boost::bind but didn't have any luck :s

I know I could do getters and setters, but there would be a lot of them because my "A" has a lot of members like "a".

Thank you in advance,
Ricardo

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

Reply via email to