[C++-sig] Base class defined in other header file not included in bp::bases<>
roman.yakovenko at gmail.com
Thu Jul 13 07:18:36 CEST 2006
On 7/13/06, Haridev, Meghana <mharidev at qualcomm.com> wrote:
> Hi Folks,
> I'm having some trouble generating boost-python wrapper code using
> pyplusplus for a derived class which has one of its base classes defined in
> another file.
> How can I get pyplusplus to add 'baseB' to bp::bases<> for 'derivedC' class
> when 'baseB' class is defined in another file (present in the same directory
If "other.hpp" presents in the same directory it will just work.
> or different directory)?
In this case baseB class will be excluded. The idea behind such
behaviour is next:
there is one directory that contains library interface and many
directories that contain
implementation details. So, by default pyplusplus excludes from generation all
declarations defined in other directories. You can find more information here:
Next few lines of code will include baseB:
mb = module_builder_t( ... )
mb.class_( 'baseB' ).include()
#or if you want to include all declarations from directory Y:
mb.decls( header_dir=Y ).include()
I hope, this will help you.
C++ Python language binding
More information about the Cplusplus-sig