What I want is to use c preprocessor to generate easy wrappers around c++
class methods. For every class, I would like to make a
lisp class, which would have one slot containing the actual void* point,
and macros would generate functions which will autocast
cl_object and/or the slot value of the item into c++ type. However, what I
would like is to install new methods for these c functions.


2013/2/28 Juan Jose Garcia-Ripoll <juanjose.garciarip...@gmail.com>

>
> On Thu, Feb 28, 2013 at 6:39 PM, Peter Enerccio <enerc...@gmail.com>wrote:
>
>> I am yet on the writing api in c++ for ecl, but I am quite puzzled on how
>> to create basic things, such as lisp methods/classes directly in c
>> environment? The documentation is silent about this. Can anyone help?
>>
>
> There is no provision in C for dealing with CLOS objects, defgeneric or
> defmethod. It simply cannot be done because defclass, defgeneric and
> defmethod are not functions, but sophisticated macros that parse and modify
> their arguments in interesting (but complicated ways).
>
> My suggestion is that you evaluate lisp code from C if you want to create
> new classes and methods. This may be done either from text or from
> S-expressions, as usual.
>
> If this looks too cumbersome, could you explain what you want to achieve
> and how?
>
> Juanjo
>
> --
> Instituto de Física Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28006 (Spain)
> http://juanjose.garciaripoll.googlepages.com
>



-- 
Bc. Peter Vaňušanik
http://www.bishojo.tk
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to