[cable] When are wrapped classes loaded ?
Brad King
brad.king at kitware.com
Wed Oct 31 16:48:29 EST 2001
Luis,
> from a Tcl script. When I check the .so library
> using "nm -C libraryName.so", the Methods of ImageIOFactory
> appear on the listing. However the command wrap::ListClasses
> doesn't show this class. It show correctly other classes
> that have also been wrapped though.
> So, my question is : What triggers the loading of a class
> in Tcl ?
The class has to be listed in the CABLE_WRAP_TCL command. The reason
those symbols are showing up is because they are instantiated by the calls
to the wrapped methods in other classes.
> If I have a class B deriving from a class A, and I want
> to wrap "B", should I also wrap the base class "A" ?
Yes, you need to wrap class A to get its methods. This prevents bloat
from each subclass having wrappers for all its superclass's methods.
-Brad
More information about the cable
mailing list