<div dir="ltr"><div>Hi,</div><div><br></div><div>Is there some example about how to wrap C++ classes with ECLs foreign function interface?</div><div><br></div><div>How, for example, would I wrap the following simple program?</div>
<div><br></div><div> ;; Making a cube of size 2</div><div> Cube* cube = new Cube(2.0);</div><div> </div><div> ;; Changing its size to 10</div><div> cube->setSize(10.0);</div><div> </div><div> ;; Getting its size</div>
<div> cube->getSize();</div><div> </div><div> ;; Deleting the object</div><div> delete cube;</div><div><br></div><div>based on a class like the following</div><div><br></div><div> class Cube {</div><div> private:</div>
<div> double _size;</div><div> public:</div><div> Cube(): _size(1.0) {}</div><div> Cube(const double size): _size(size) {}</div><div> void setSize(const double size) { _size = size; }</div><div> double getSize() const { return _size; }</div>
<div> };</div><div><br></div><div>?</div><div><br></div><div>Thanks, Dietrich</div><div><br></div></div>