public abstract class NativePrimitive extends BaseNativeType
copyIn, copyOut, passByPointer, ptr, ref, type
Constructor and Description |
---|
NativePrimitive()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
readNative(memptr ptr)
Worker method to read the primitive value from the first index position of the given
memory buffer.
|
long |
render(long addr)
Render the data into native memory, which will be allocated if the address is not
given.
|
void |
restore(long addr)
Copy back (if necessary) data from the native memory and deallocate the memory
if this instance allocated it in the first place.
|
protected abstract void |
writeNative(memptr ptr)
Worker method to write the primitive value to the first index position of the given
memory buffer.
|
isCopyIn, isCopyOut, isPassByPointer, readExternal, render, restore, setCopyIn, setCopyOut, setPassByPointer, setType, size, type, writeExternal
public long render(long addr)
This should never be called on the server, only on the client side.
render
in class BaseNativeType
addr
- The memory address to which the data should be rendered, if the caller
is supplying a buffer or 0 if the buffer should be allocated.public void restore(long addr)
This should never be called on the server, only on the client side.
restore
in class BaseNativeType
addr
- The memory address from which the data should be restored, if the caller
is supplying a buffer or 0 if the buffer should already exist.protected abstract void readNative(memptr ptr)
ptr
- The memory buffer to reference.protected abstract void writeNative(memptr ptr)
ptr
- The memory buffer to reference.