|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface INativeObject
NativeObject| Method Summary | |
|---|---|
void |
delete()
Deletes the corresponding C++ object. |
void |
disconnectFromNativeObject()
Separates this Java object from it's corresponding C++ object. |
InstancePointer |
getInstancePointer()
Needed for Interfaces which are needed for multiple inheritance |
void |
setInstancePointer(InstancePointer pInstance,
boolean argRemote)
Sets the instance pointer for the native object that is managed by this java object. |
void |
setInstancePointer(long pInstance)
Convenience method to set the instance pointer. |
void |
setInstancePointer(long pInstance,
boolean createdByLibray)
Convenience method to set the instance pointer. |
| Method Detail |
|---|
InstancePointer getInstancePointer()
void delete()
Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
#remote
void setInstancePointer(InstancePointer pInstance,
boolean argRemote)
Note: This is an internal method. Do not use it to change the instance pointer!
pInstance - The instance pointer to set.argRemote - If the native object is created by the underlaying library.
java.lang.NullPointerException - if the instance pointer is null.void setInstancePointer(long pInstance)
Note: This is an internal method. Do not use it to change the instance pointer!
setInstancePointer(long, boolean)
void setInstancePointer(long pInstance,
boolean createdByLibray)
Note: This is an internal method. Do not use it to change the instance pointer!
setInstancePointer(InstancePointer, boolean)void disconnectFromNativeObject()
Needed for templates as return values.
Consider following situation in the original library:
template <class T> class A;
class B;
class C {
public:
A<B>* a();
};
The method C::a() must return a Java object. But there is no Java
class we could instantiate because only Java interfaces can be generated for
templates. So this return value must be passed as parameter which has the generated
interface as type (with default configuration):public void a(org.xbig.IA< org.xbig.IB > returnValue).
With this method an unneeded Java object can be deleted without deleting a still needed
C++ object. Do not forget to set the unneeded Java reference to null!
WithoutNativeObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||