[Ecls-list] How to wrap C++ classes using ECLs foreign function interface?
Dietrich Bollmann
dietrich at formgames.org
Thu Jun 6 09:25:00 UTC 2013
Hi,
Is there some example about how to wrap C++ classes with ECLs foreign
function interface?
How, for example, would I wrap the following simple program?
;; Making a cube of size 2
Cube* cube = new Cube(2.0);
;; Changing its size to 10
cube->setSize(10.0);
;; Getting its size
cube->getSize();
;; Deleting the object
delete cube;
based on a class like the following
class Cube {
private:
double _size;
public:
Cube(): _size(1.0) {}
Cube(const double size): _size(size) {}
void setSize(const double size) { _size = size; }
double getSize() const { return _size; }
};
?
Thanks, Dietrich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20130606/3a3acc41/attachment.html>
More information about the ecl-devel
mailing list