|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jniwrapper.Parameter | +--com.jniwrapper.DelegatingParameter | +--com.jniwrapper.WideChar
Represents unicode character (wchar_t
)
Constructor Summary | |
WideChar()
Constructs a new wchar_t parameter. |
|
WideChar(char c)
Constructs a new wchar_t parameter. |
|
WideChar(WideChar t)
Constructs a new wchar_t parameter. |
Method Summary | |
protected void |
acceptIOPerformer(IOPerformer performer,
DataBuffer source,
int initialOffset,
boolean isReadOperation,
boolean invokedByCallback)
Realization of a Visitor pattern for parameter IO. |
java.lang.Object |
clone()
|
protected DataBuffer |
getDataBuffer()
Returns current data storage. |
protected int |
getDataBufferOffset()
Returns current offset within data storage. |
int |
getLength()
Returns a length of the parameter in memory. |
char |
getValue()
Returns value of this parameters as Unicode character. |
void |
pop(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Default implementation, which does nothing as 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)
Sets the data buffer this parameter should use to store data and an offset in bytes within that buffer. |
void |
setValue(char value)
Sets this parameter to the given Unicode character value. |
Char |
toChar()
|
java.lang.String |
toString()
|
void |
write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Writes this parameter to a specified data source. |
Methods inherited from class com.jniwrapper.Parameter |
asReturnValue, equals, getAlignedLength, getAlignmentRequirement, indent, read, toByteArray, write |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WideChar()
wchar_t
parameter.
public WideChar(char c)
wchar_t
parameter.
c
- initial value.public WideChar(WideChar t)
wchar_t
parameter.
t
- parameter to get initial value from.Method Detail |
public int getLength()
Parameter
sizeof()
operator.
getLength
in class com.jniwrapper.DelegatingParameter
public java.lang.Object clone()
clone
in class Parameter
public char getValue()
public void setValue(char value)
public java.lang.String toString()
toString
in class java.lang.Object
public Char toChar()
protected void acceptIOPerformer(IOPerformer performer, DataBuffer source, int initialOffset, boolean isReadOperation, boolean invokedByCallback)
Parameter
performer
is responsible for I/Oing 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
- visitor responsible for I/Oing the parametersource
- data buffer for I/O operationinitialOffset
- I/O operation offset of this parameter in the bufferprotected void setDataBuffer(DataBuffer newSource, int newOffset)
Parameter
setDataBuffer
in class Parameter
protected DataBuffer getDataBuffer()
Parameter
getDataBuffer
in class Parameter
protected int getDataBufferOffset()
Parameter
getDataBufferOffset
in class Parameter
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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |