|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.aq.value.Value
public abstract class Value
Field Summary | |
---|---|
static char |
DELIMITER_C
|
static java.lang.String |
DELIMITER_S
|
static int |
SIZEOF_BYTE
|
static int |
SIZEOF_DOUBLE
|
static int |
SIZEOF_FLOAT
|
static int |
SIZEOF_INT
|
static int |
SIZEOF_LONG
|
static int |
SIZEOF_SHORT
|
Constructor Summary | |
---|---|
Value()
|
Method Summary | ||
---|---|---|
abstract void |
copyFrom(com.sun.jna.Pointer buffer)
Reads all elements of that value from a piece of memory pointed to by buffer . |
|
abstract void |
copyTo(com.sun.jna.Pointer buffer)
Writes all elements of that value to a piece of memory pointed to by buffer . |
|
static
|
getNativeTypeId(java.lang.Class<V> clazz)
Returns the native type id of the given class or -1, if that type id cannot be obtained. |
|
abstract int |
getSerializedSize()
Returns the size in bytes of this object when serialized. |
|
abstract com.sun.jna.Memory |
getSharedMemory()
Returns a pointer to a piece of memory, that provides space for at least getSerializedSize() bytes and can be directly used in conjunction
with copyTo(Pointer) and copyFrom(Pointer) . |
|
abstract boolean |
parseFrom(java.util.Scanner sc)
Parses new content of that value from the given Scanner . |
|
abstract java.io.PrintStream |
printTo(java.io.PrintStream ps)
Prints all elements of that value to a stream in a human-readable format. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char DELIMITER_C
public static final java.lang.String DELIMITER_S
public static final int SIZEOF_BYTE
public static final int SIZEOF_SHORT
public static final int SIZEOF_INT
public static final int SIZEOF_LONG
public static final int SIZEOF_FLOAT
public static final int SIZEOF_DOUBLE
Constructor Detail |
---|
public Value()
Method Detail |
---|
public static <V extends Value> int getNativeTypeId(java.lang.Class<V> clazz)
Value
to its corresponding C++ type.
V
- the value type parameterclazz
- the class object of the value type
public abstract void copyFrom(com.sun.jna.Pointer buffer)
buffer
. You have to make sure, that the size of this buffer is
at least getSerializedSize()
.
buffer
- a pointer to free memorypublic abstract void copyTo(com.sun.jna.Pointer buffer)
buffer
. You have to make sure, that the size of this buffer is
at least getSerializedSize()
.
buffer
- a pointer to free memorypublic abstract boolean parseFrom(java.util.Scanner sc)
Scanner
.
sc
- a Scanner
to parse the data from
true
if on success, false
otherwise.public abstract java.io.PrintStream printTo(java.io.PrintStream ps)
ps
- a stream to print all elements topublic abstract com.sun.jna.Memory getSharedMemory()
Returns a pointer to a piece of memory, that provides space for at
least getSerializedSize()
bytes and can be directly used in conjunction
with copyTo(Pointer)
and copyFrom(Pointer)
.
For the sake of efficiency the provided memory may be some sort of
shared memory, which can be used temporarily, to transfer data somewhere,
e.g. to native code. Please note that the usage of this buffer in
multi-threaded code has to be synchronized
.
copyFrom(Pointer)
,
copyTo(Pointer)
,
getSerializedSize()
public abstract int getSerializedSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |