[pygccxml-development] cls.null_constructor_body bug?
Brought to you by:
mbaas,
roman_yakovenko
From: <bf...@co...> - 2008-09-08 13:04:07
|
I am trying out to insert code into the py++ generated code as described in http://www.language-binding.net/pyplusplus/documentation/inserting_code.html Here is the relevant part of my codebuilder file: def inject_code( cls ): constructors = cls.constructors() constructors.body = "// (STUFF FOR ALL CONSTRUCTORS)" #class instance registration code cls.null_constructor_body = "// NULL CONSTRUCTORS STUFF " #class instance registration code cls.copy_constructor_body = "//COPY CONSTRUCTOR STUFF" #class instance registration code cls.add_wrapper_code("//WRAPPER STUFF" ) #destructor declaration and definition code cls.add_wrapper_code("//MORE WRAPPER STUFf") # the new class variable definition code x = mb.class_("MyClass") x.include() inject_code(x) The generated code does not contain the "// NULL CONSTRUCTORS STUFF ", though (see below). Is this a bug? Bernd struct MyClass_wrapper : MyClass, bp::wrapper< MyClass > { MyClass_wrapper(MyClass const & arg ) : MyClass( arg ) , bp::wrapper< MyClass >(){ // copy constructor //COPY CONSTRUCTOR STUFF } MyClass_wrapper( ) : MyClass( ) , bp::wrapper< MyClass >(){ // null constructor // (STUFF FOR ALL CONSTRUCTORS) } MyClass_wrapper(::std::string const & s ) : MyClass( s ) , bp::wrapper< MyClass >(){ // constructor // (STUFF FOR ALL CONSTRUCTORS) } MyClass_wrapper(::search3::key const & k ) : MyClass( boost::ref(k) ) , bp::wrapper< MyClass >(){ // constructor // (STUFF FOR ALL CONSTRUCTORS) } |