Hi,
Here is a question.(see Subject title) I am particularly interested in such
implementation using python.boost library.
For simple cases I've seen examples, such as:

int x = extract<int>(obj.attr("Attribute_name"))

However, when a type T in extract<T>() becomes user-specified things become
harder. For example,
suppose I have a type Vector wich is something like:

class Vector{
public:
double x,y,z;
};

and want to extract information from python object obj to c++ obect of class
Vector IN ONE OPERATION.
I've found that there are some converters for some standard types, but I'm
not able to manage how to do this
for my class. What should I do in order to make the extract<> function to
understand how it should convert a python
object (represented as boost::python::object - something like this) into
Vector object?
Again, variant like:
Vector r;
r.x = extract<double>(obj.attr("x"))
... and so on
are not interested. I need to make it in one operation.
Thanks

Alexey
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to