Boost.python-Inner class

Hi , I have C++ code like class A { class B; --- --- } can any body help me in how I can map inner class for building python module. Thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

On Wed, 2005-05-11 at 13:59 -0700, pankaj jain wrote:
Hi , I have C++ code like class A { class B; --- --- } can any body help me in how I can map inner class for building python module.
class_<A> A( "A"); class_<A::B> B( "B"); A.attr( "B") = B; del( scope().attr( "B")); Comes pretty close. However, instances of A.B will have a __class__.__name__ = "B" rather than "A.B". If this isn't close enough, you should bring up the question on c++-sig@python.org (the primary mailing list for Boost.Python). HTH, -Jonathan
participants (2)
-
Jonathan Brandmeyer
-
pankaj jain