Home | History | Annotate | Download | only in common
      1 /** Managed objects are java objects of which the reference is maintained by the wrapper and the instance is reused
      2  * by using a LongMap lookup with the native pointer.
      3  *
      4  * Use managed objects for classes which are likely to be created by the user and are expected to live long.
      5  * @author Xoppa */
      6 %define CREATE_MANAGED_OBJECT(_TYPE)
      7 
      8 %typemap(javaout) 	_TYPE *, const _TYPE *, _TYPE * const & {
      9 	return _TYPE.getInstance($jnicall, $owner);
     10 }
     11 
     12 %typemap(javadirectorin) _TYPE *, const _TYPE *, _TYPE * const &	"_TYPE.getInstance($1, false)"
     13 %enddef // CREATE_MANAGED_OBJECT