public abstract class DelegatingParameter extends Parameter
Parameter
type.LICENSE_TYPE, V
Constructor and Description |
---|
DelegatingParameter(Parameter value) |
Modifier and Type | Method and Description |
---|---|
protected void |
acceptIOPerformer(IOPerformer performer,
DataBuffer source,
int initialOffset,
boolean isReadOperation,
boolean invokedByCallback)
Implementation of a Visitor pattern for parameter IO.
|
protected DataBuffer |
getDataBuffer()
Returns a current data storage.
|
protected int |
getDataBufferOffset()
Returns a current offset within data storage.
|
java.lang.String |
getDebugInfo()
Return debug info for JNIWrapper parameter.
|
int |
getLength()
Returns the length of the parameter in memory.
|
protected Parameter |
getValueObject() |
void |
pop(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Default implementation that does nothing because most primitive types do
nothing on pop.
|
void |
push(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Writes a parameter to a function stacks.
|
void |
read(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Reads this parameter from a specified data source.
|
protected void |
setDataBuffer(DataBuffer newSource,
int newOffset,
boolean shouldRead)
Sets the data buffer this parameter should use to store data and an
offset in bytes within that buffer.
|
protected void |
setValueObject(Parameter value) |
java.lang.String |
toString() |
void |
write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Writes this parameter to a specified data source.
|
asReturnValue, clone, dataBufferAssigned, equals, getAlignedLength, getAlignmentRequirement, hashCode, indent, read, read, toByteArray, write
public DelegatingParameter(Parameter value)
protected void acceptIOPerformer(IOPerformer performer, DataBuffer source, int initialOffset, boolean isReadOperation, boolean invokedByCallback)
Parameter
performer
is responsible for reading and writing the
parameter. Users implementing a complex parameter from scratch (i.e. not
by extending a pre-existing class such as Structure
or
Pointer
) may wish to override this method to make a
performer visit object internal parts.acceptIOPerformer
in class Parameter
performer
- a visitor responsible for I/Oing the parameter.source
- data buffer for I/O operation.initialOffset
- I/O operation offset of this parameter in the
buffer.protected void setDataBuffer(DataBuffer newSource, int newOffset, boolean shouldRead)
Parameter
setDataBuffer
in class Parameter
protected DataBuffer getDataBuffer()
Parameter
getDataBuffer
in class Parameter
protected int getDataBufferOffset()
Parameter
getDataBufferOffset
in class Parameter
protected Parameter getValueObject()
protected void setValueObject(Parameter value)
public int getLength()
Parameter
sizeof()
operator.public void write(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
write
in class Parameter
MemoryAccessViolationException
public void read(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
read
in class Parameter
MemoryAccessViolationException
public void push(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
push
in class Parameter
MemoryAccessViolationException
public void pop(DataBuffer stackBuffer, int offset, boolean invokedByCallback) throws MemoryAccessViolationException
Parameter
pop
in class Parameter
MemoryAccessViolationException
public java.lang.String getDebugInfo()
Parameter
getDebugInfo
in class Parameter
public java.lang.String toString()
toString
in class java.lang.Object