a.h
===
#ifndef _INEX_A__
#define _INEX_A__
#include "b.h"
namespace parent{
namespace child{
class A{
public:
A(int const &);
A(int, int);
A(B const &);
int getA(int);
};
};
};
#endif
b.h
===
#ifndef _INEX_B__
#define _INEX_B__
namespace parent{
namespace child{
class B{
public:
int getB(int);
};
};
};
#endif
export.py
=======
import os
import pygccxml
from pyplusplus import module_builder
mb=module_builder.module_builder_t(["/usr/vbayskar/a.h"])
cons = mb.constructors('A', arg_types=[None])
for con in cons:
print con
mb.build_code_creator(module_name = 'testModule')
mb.write_module('testModule.cpp')
Output for print statement (used in the above export.py file)
==================
parent::child::A::A(parent::child::A const & arg0) [copy constructor]
parent::child::A::A(int const & arg0) [constructor]
parent::child::A::A(parent::child::B const & arg0) [constructor]
My question is
how do I search for the constructor
parent::child::A::A(parent::child::B const & arg0) [constructor]
What arg_types should I provide ?
I have tried with and without namespaces like
cons = mb.constructors('A', arg_types=['parent::child::B const &'])
cons = mb.constructors('A', arg_types=['child::B const &'])
cons = mb.constructors('A', arg_types=['B const &'])
But every time it is giving an error
raise RuntimeError( "Multi declaration query returned 0 declarations." )
I don't know what bits I am missing please suggest.
--
View this message in context:
http://old.nabble.com/How-to-search-constructors-with-namespace-tp28739257p28739257.html
Sent from the Python - c++-sig mailing list archive at Nabble.com.
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig