|
From: Soeren S. <so...@de...> - 2011-09-27 07:01:56
|
On Thu, 2011-08-04 at 07:31 +0100, William S Fulton wrote: > On 19/07/11 13:53, Soeren Sonnenburg wrote: > > Hi, > > > > is it possible to have the swig generated classes implement a certain > > interface? Is there a pragma / directive for that. I managed to do that > > for all *JNI.java classes and also the module class but not for the > > wrapped objects themselves... > > > > > > What I'd like to do is have every object implement the Serializable > > interface... > > > > There is the 'javainterfaces' typemap. You can override the default one > like this: > > %typemap(javainterfaces) SWIGTYPE "Serializable" Thanks! That worked nicely - we now finally have java serialization support in shogun :-) https://github.com/shogun-toolbox/shogun/blob/master/src/interfaces/java_modular/swig_typemaps.i https://github.com/shogun-toolbox/shogun/blob/master/src/interfaces/modular/SGBase.i Soeren -- For the one fact about the future of which we can be certain is that it will be utterly fantastic. -- Arthur C. Clarke, 1962 |