Boost logo

Boost Users :

From: Wyatt Greenway (th317erd_at_[hidden])
Date: 2005-10-02 16:21:36


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net