de.intarsys.nativec.type
public class StructMember extends java.lang.Object
NativeStructType
.Modifier and Type | Field and Description |
---|---|
protected int |
index
the index of the member within the struct
|
protected java.lang.String |
name
The members name
|
Modifier | Constructor and Description |
---|---|
protected |
StructMember(NativeStructType structType,
java.lang.String name,
int index,
INativeType memberType,
int offset)
Create a slot with name "name" and the declaration "memberDeclaration"
|
Modifier and Type | Method and Description |
---|---|
byte |
getByte(NativeStruct struct,
int index)
Performance shortcut to access "byte" in the struct member.
|
byte[] |
getByteArray(NativeStruct struct,
int index,
int count)
Performance shortcut to access "byte[]" in the struct member.
|
long |
getCLong(NativeStruct struct,
int index)
Performance shortcut to access "platform sized long" in the struct
member.
|
int |
getInt(NativeStruct struct,
int index)
Performance shortcut to access "int" in the struct member.
|
long |
getLong(NativeStruct struct,
int index)
Performance shortcut to access "long" in the struct member.
|
protected INativeType |
getMemberType()
The type declaration of the slot.
|
java.lang.String |
getName()
The slots name.
|
INativeHandle |
getNativeHandle(NativeStruct struct,
int index)
Performance shortcut to access "INativeHandle" in the struct member.
|
INativeObject |
getNativeObject(NativeStruct struct) |
protected int |
getOffset()
The offset of the slot relative to the StructDeclaration.
|
short |
getShort(NativeStruct struct,
int index)
Performance shortcut to access "short" in the struct member.
|
java.lang.String |
getString(NativeStruct struct,
int index)
Performance shortcut to access "String" in the struct member.
|
java.lang.Object |
getValue(NativeStruct struct) |
java.lang.String |
getWideString(NativeStruct struct,
int index)
Performance shortcut to access "String" (from wide characters) in the
struct member.
|
void |
setByte(NativeStruct struct,
int index,
byte value)
Performance shortcut to access "byte" in the struct member.
|
void |
setByteArray(NativeStruct struct,
int index,
byte[] value,
int valueOffset,
int valueCount)
Performance shortcut to access "byte[]" in the struct member.
|
void |
setCLong(NativeStruct struct,
int index,
long value)
Performance shortcut to access "platform sized long" in the struct
member.
|
void |
setInt(NativeStruct struct,
int index,
int value)
Performance shortcut to access "int" in the struct member.
|
void |
setLong(NativeStruct struct,
int index,
long value)
Performance shortcut to access "long" in the struct member.
|
void |
setNativeHandle(NativeStruct struct,
int index,
INativeHandle value)
Performance shortcut to access "INativeHandle" in the struct member.
|
void |
setShort(NativeStruct struct,
int index,
short value)
Performance shortcut to access "short" in the struct member.
|
void |
setString(NativeStruct struct,
int index,
java.lang.String value)
Performance shortcut to access "String" in the struct member.
|
void |
setValue(NativeStruct struct,
java.lang.Object value) |
void |
setWideString(NativeStruct struct,
int index,
java.lang.String value)
Performance shortcut to access "String" (from wide characters) in the
struct member.
|
java.lang.String |
toString() |
protected final java.lang.String name
protected final int index
protected StructMember(NativeStructType structType, java.lang.String name, int index, INativeType memberType, int offset)
public byte getByte(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic byte[] getByteArray(NativeStruct struct, int index, int count)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic long getCLong(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic int getInt(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic long getLong(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member baseprotected INativeType getMemberType()
public java.lang.String getName()
public INativeHandle getNativeHandle(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic INativeObject getNativeObject(NativeStruct struct)
protected int getOffset()
public short getShort(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic java.lang.String getString(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic java.lang.Object getValue(NativeStruct struct)
public java.lang.String getWideString(NativeStruct struct, int index)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setByte(NativeStruct struct, int index, byte value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setByteArray(NativeStruct struct, int index, byte[] value, int valueOffset, int valueCount)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setCLong(NativeStruct struct, int index, long value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setInt(NativeStruct struct, int index, int value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setLong(NativeStruct struct, int index, long value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setNativeHandle(NativeStruct struct, int index, INativeHandle value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setShort(NativeStruct struct, int index, short value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setString(NativeStruct struct, int index, java.lang.String value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic void setValue(NativeStruct struct, java.lang.Object value)
public void setWideString(NativeStruct struct, int index, java.lang.String value)
struct
- The container struct instanceindex
- The memory offset from the struct member basepublic java.lang.String toString()
toString
in class java.lang.Object