be.cardon.nativecall
Class NativeBoolean

java.lang.Object
  extended by be.cardon.nativecall.NativeObject
      extended by be.cardon.nativecall.NativeBoolean

public class NativeBoolean
extends NativeObject

Wrapped class for native bool type. Note that the length definition is ambiguous (the effective memory length varies). Class with read only support.


Field Summary
static int LengthInBytes
          The allocated memory is not always equal to this valuen but it doesn't matter (LengthInBytes is only used for allocation and must be >=1) !
 
Fields inherited from class be.cardon.nativecall.NativeObject
BYTE_SIZE, INT_SIZE, LLC
 
Constructor Summary
NativeBoolean()
          allocates a new boolean
NativeBoolean(int address)
          existing boolean.
NativeBoolean(int address, boolean readOnly)
          existing boolean, with protection or not.
 
Method Summary
 boolean get()
          return the native bool value.
static NativeBoolean newInstance(NativeObject obj)
          Convert a NativeObject in a NativeBoolean.
 void set(boolean value)
          set the native bool value.
 
Methods inherited from class be.cardon.nativecall.NativeObject
finalize, getAddress, getLength, isReadOnly, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LengthInBytes

public static final int LengthInBytes
The allocated memory is not always equal to this valuen but it doesn't matter (LengthInBytes is only used for allocation and must be >=1) !

See Also:
Constant Field Values
Constructor Detail

NativeBoolean

public NativeBoolean()
              throws NativeCallException
allocates a new boolean

Throws:
NativeCallException

NativeBoolean

public NativeBoolean(int address)
              throws NativeCallException
existing boolean.

Throws:
NativeCallException

NativeBoolean

public NativeBoolean(int address,
                     boolean readOnly)
              throws NativeCallException
existing boolean, with protection or not.

Throws:
NativeCallException
Method Detail

newInstance

public static NativeBoolean newInstance(NativeObject obj)
                                 throws NativeCallException
Convert a NativeObject in a NativeBoolean. The size of the native object must be <= 4.

Throws:
NativeCallException

get

public boolean get()
            throws NativeCallException
return the native bool value.

Throws:
NativeCallException

set

public void set(boolean value)
         throws NativeCallException
set the native bool value.

Throws:
NativeCallException