public static interface Closure.Buffer
Modifier and Type | Method and Description |
---|---|
long |
getAddress(int index)
Gets the value of a native pointer parameter.
|
byte |
getByte(int index)
Gets the value of an 8 bit integer parameter.
|
double |
getDouble(int index)
Gets the value of a 64 bit floating point parameter.
|
float |
getFloat(int index)
Gets the value of a 32 bit floating point parameter.
|
int |
getInt(int index)
Gets the value of a 32 bit integer parameter.
|
long |
getLong(int index)
Gets the value of a 64 bit integer parameter.
|
short |
getShort(int index)
Gets the value of a 16 bit integer parameter.
|
long |
getStruct(int index)
Gets the address of a struct parameter that is passed by value.
|
void |
setAddressReturn(long address)
Sets the closure return value to a native pointer value.
|
void |
setByteReturn(byte value)
Sets the closure return value to an 8 bit integer value.
|
void |
setDoubleReturn(double value)
Sets the closure return value to a 64 bit floating point value.
|
void |
setFloatReturn(float value)
Sets the closure return value to a 32 bit floating point value.
|
void |
setIntReturn(int value)
Sets the closure return value to a 32 bit integer value.
|
void |
setLongReturn(long value)
Sets the closure return value to a 64 bit integer value.
|
void |
setShortReturn(short value)
Sets the closure return value to a 16 bit integer value.
|
void |
setStructReturn(byte[] data,
int offset)
Sets the closure return value to the contents of a struct
|
void |
setStructReturn(long address)
Sets the closure return value to the contents of a struct
|
byte getByte(int index)
index
- The parameter indexshort getShort(int index)
index
- The parameter indexint getInt(int index)
index
- The parameter indexlong getLong(int index)
index
- The parameter indexfloat getFloat(int index)
index
- The parameter indexdouble getDouble(int index)
index
- The parameter indexlong getAddress(int index)
index
- The parameter indexlong getStruct(int index)
index
- The parameter indexvoid setByteReturn(byte value)
value
- The 8 bit integer value to return from the closure.void setShortReturn(short value)
value
- The 16 bit integer value to return from the closure.void setIntReturn(int value)
value
- The 32 bit integer value to return from the closure.void setLongReturn(long value)
value
- The 64 bit integer value to return from the closure.void setFloatReturn(float value)
value
- The 32 bit floating point value to return from the closure.void setDoubleReturn(double value)
value
- The 64 bit floating point value to return from the closure.void setAddressReturn(long address)
address
- The native pointer value to return from the closure.void setStructReturn(long address)
address
- The address of a native struct to return as a struct value from the closure.void setStructReturn(byte[] data, int offset)
data
- Struct data packed into a byte array to return as a struct value from the closure.offset
- the offset within the byte array to start copying dataCopyright © 2016. All Rights Reserved.