
Hi ,
Can someone can give me some help on how to expose correctly an array
of object pointers using boost.python ?
here is a small example of what i need
i have a class
class A
{
public:
A(std::string &oName);
~A(){}
const std::string &GetName() const;
}
class B
{
std::vector<*A> *poNames
public:
std::vector<*A> GetNames() { return *poNames }
}
assume that there is two instances of A in the container of the object B
now for the boost::python code. I would like to be able to expose class
a and class b and the vector of A*
typedef std::vector array_proj;
array_proj::iterator begin_array_proj(array_proj &x) {return x.begin();}
array_proj::iterator end_array_proj(array_proj &x) {return x.end();}
BOOST_PYTHON_MODULE(pysession)
{
class_<A>("object a",init
participants (1)
-
CT