How do I acomplish this: class A { public: int *Buffer; vector<string> Array; A() { this->Buffer = new int[10]; /* Set items in Buffer */} } /* Boost code */ class_<A>("A") .def("Buffer", &A::Buffer) .def("Array", &A::Array) ; /*-----*/ And in python it would look like so:
MyA = A() print MyA.Buffer[0] MyA.Array.append("Hello world!") print MyA.Array[0]
??????? Thanks in advance for any help
Wyatt Greenway
How do I acomplish this:
class A { public: int *Buffer; vector<string> Array;
A() { this->Buffer = new int[10]; /* Set items in Buffer */} }
/* Boost code */
class_<A>("A") .def("Buffer", &A::Buffer) .def("Array", &A::Array) ;
/*-----*/
And in python it would look like so:
MyA = A() print MyA.Buffer[0] MyA.Array.append("Hello world!") print MyA.Array[0]
???????
Thanks in advance for any help
Wyatt, I suggest you post your question to http://www.boost.org/more/mailing_lists.htm#cplussig I'm sure someone there can help you. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
Wyatt Greenway