org.xbig.base
Class NativeObjectPointer<T extends INativeObject>

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.xbig.base.NativeObjectPointer<T>
All Implemented Interfaces:
INativeObject

public class NativeObjectPointer<T extends INativeObject>
extends NativeObject

The native object pointer is a generic to handle pointer pointers in C. E.g. float ** a.


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
NativeObjectPointer(InstancePointer pInstance)
          Creates a new java object that points to a pointer-pointer created remote.
 
Method Summary
 void delete()
          Deletes the corresponding C++ object.
 void getObject(T nativeObject)
          Retreives the native object this NativeObjectPointer points to.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, finalize, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NativeObjectPointer

public NativeObjectPointer(InstancePointer pInstance)
Creates a new java object that points to a pointer-pointer created remote.

Note: This is not public API. Constructor is public for internal use only.

Parameters:
pInstance - The instance pointer for this NativeObjectPointer.
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

getObject

public void getObject(T nativeObject)
Retreives the native object this NativeObjectPointer points to.

Note: For the given native object this function will free possible alocated memory by calling INativeObject.delete().

Parameters:
nativeObject - The native object to set the instance pointer.
Throws:
java.lang.NullPointerException - if the native object is null.


Copyright © 2007 netAllied GmbH. All Rights Reserved.