|
Boost Users : |
From: Jonathan Brandmeyer (jbrandmeyer_at_[hidden])
Date: 2005-05-11 21:22:50
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_at_[hidden] (the primary
mailing list for Boost.Python).
HTH,
-Jonathan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net