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

FFI (was Re: Development/Production versions (was RE: CVS))



Quoting Leo Razoumov:
> Do you mean that the inheritance hierarcy of wrapped glue code does
> not reflect the inheritance hierarchy of the original C++ library?
> 
>            BaseClass  <----inhereted---- DerivedClass
>    WRAPPED_BaseClass  --NOT_inhereted--- WRAPPED_DerivedClass

My little test suggests that this information is preserved.

What I meant is that SWIG's Guile output appears to support creating
class instances within Scheme, and calling instance methods within
Scheme, but *not* deriving new subclasses within Scheme. To summarize
in MzScheme terms:

   (make-object BaseClass ...)   - YES
   (send a-BaseClass ...)        - YES
   (class BaseClass ...)         - NO

Depending on how you want to use a C++ library, deriving new subclasses
within Scheme may not be important. In the case of wxWindows, it
*would* be important for using the library effectively. For example,
subclassing is the mechanism for handling canvas events, where a
subclass overrides the OnEvent() method.

Matthew