From: John M. <jm...@ma...> - 2004-09-21 02:51:28
|
Hi; Short version: need help beyond user's manual (preferably a mentor) making sense of sb-alien package so as to call C++ code from SBCL. Longer version: I have a big (several man-decades' worth) and wide (thousands of entry points) C++ source code base which I would like to drive from Common Lisp. It is far too big either to rewrite it or to write bindings by hand, and it is a moving target (several active developers, and several releases per year). I have successfully used GCCXML, XMLS, and some few lines of CL code to get parse trees corresponding to the original C++ code into CL. Most non-C++-class things are obvious, but: (1) I do not know how "smart" sb-alien's type matching is (e.g., has it any notion of classes, subclasses, and/or superclasses?), and whether I can convince it to let me call C++ superclass methods on C++ subclasses (virtual methods or otherwise). I could not find such info in the manual (nor did I expect to). Obviously, I want to permit calls to such methods as they are permitted (encouraged) in C++. (2) I do not know the magic involved in sb-alien's assurance that the lisp definitions of (say) structure members (e.g., their offsets) match the underlying C structure member definitions. While the C++ source code I am using has accessors and mutators galore, I may want to do similar magic to make the facility generally useful for manipulating C++ class instances which lack accessors and mutators for all slots (a.k.a., instance variables). Would anybody please be so kind as to shed some light on the above questions? The first one is the most important to me right now. Thanks, and Very Truly Yours, -jm -- ==== John Morrison ==== MAK Technologies Inc. ==== 10 Fawcett Street, Cambridge, MA 02138 ==== http://www.mak.com/ ==== vox:617-876-8085 x115 ==== fax:617-876-9208 ==== jm...@ma... |