guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ Embeded GOOPS interpreter


From: Andreas Rottmann
Subject: Re: C++ Embeded GOOPS interpreter
Date: Thu, 16 Oct 2003 16:39:51 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Laurent Marzullo <address@hidden> writes:

> Hello,
>
> I would like to write a C++ Application which will use a GOOPS
> interpreter.
>
> The C++ application will provide a set of class that could
> be used in a scheme programme.
>
> For example, I would like to provide:
>
> class MyClass
> {
>     public:
>         MyClass( int p );
>         void SayHello( void );
>
>     private:
>         int   m_private;
> };
>
> (Perhaps the class above could be seen as:
> (define-class <MyClass> ()
>     (p #:init-value 0))
>
>
> and to be able to write in scheme:
>
> (define my_object (make <MyClass> #:p 5 ))
>
> I've take a look at SWIG to generate wrapper function etc, but
> it does not use GOOPS even with -c++ option ?
> Is there any doc where I could find information of how to write C++
> code to provide C++ class access in scheme ?
>
I've written something like this, although it depends on Guile 1.7
(CVS) (but it should be easy to get it running with 1.6) and still has
quite some bugs. See
http://ucxx.sourceforge.net/docs/manual/ch01s02.html#id2816562. I
recommend you try the CVS version. Even if you don't really use Yehia,
it's code (esp. the stuff in
http://cvs.sourceforge.net/viewcvs.py/ucxx/yehia/plugins/guile/)
should be useful for ypur purposes. Feel free to ask me if you need
help wrt. Yehia.


HTH & Regards, Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Packages should build-depend on what they should build-depend.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]