public class ArithmeticalPointer extends Pointer
Pointer.Const, Pointer.OutOnly, Pointer.Void
POINTER_LENGTH
LICENSE_TYPE, V
Constructor and Description |
---|
ArithmeticalPointer(Parameter ref)
Constructs a pointer to a given object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int i)
Offsets this pointer by i bytes forward.
|
int |
getArithmeticOffset()
Returns offset in bytes of this pointer from its initial value.
|
protected void |
readPointer(DataBuffer stackBuffer,
int offset)
Reads a pointer value and referenced object.
|
void |
subtract(int i)
Offsets this pointer by i bytes backward.
|
protected void |
writePointer(DataBuffer stackBuffer,
int offset)
Writes a pointer value using pointer arithmetic offset.
|
acceptIOPerformer, asTypedPointer, asVoidPointer, castTo, castTo, checkMemHandleLength, clone, equals, getDebugInfo, getLength, getParameterClass, getPointerHandle, getReferencedObject, isNull, pop, push, read, read, readReferencedObject, setExternalSource, setNull, setReferencedObject, setReferencedObject, write, write, writeReferencedObject
asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, hashCode, indent, read, setDataBuffer, toByteArray
public ArithmeticalPointer(Parameter ref)
ref
- a referenced objectpublic void add(int i)
i
- byte offsetpublic void subtract(int i)
i
- byte offsetpublic int getArithmeticOffset()
protected void writePointer(DataBuffer stackBuffer, int offset) throws MemoryAccessViolationException
Note: The referenced object will be written by the original pointer, disregarding the offset value.
writePointer
in class Pointer
stackBuffer
- the buffer to write intooffset
- the offset in the buffer to write pointer atMemoryAccessViolationException
protected void readPointer(DataBuffer stackBuffer, int offset) throws MemoryAccessViolationException
readPointer
in class Pointer
MemoryAccessViolationException