Package de.intarsys.nativec.type
Class StructMember
- java.lang.Object
-
- de.intarsys.nativec.type.StructMember
-
public class StructMember extends java.lang.ObjectA field definition within aNativeStructType.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStructMember(NativeStructType structType, java.lang.String name, int index, INativeType memberType, int offset)Create a slot with name "name" and the declaration "memberDeclaration"
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytegetByte(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.longgetCLong(NativeStruct struct, int index)Performance shortcut to access "platform sized long" in the struct member.intgetInt(NativeStruct struct, int index)Performance shortcut to access "int" in the struct member.longgetLong(NativeStruct struct, int index)Performance shortcut to access "long" in the struct member.protected INativeTypegetMemberType()The type declaration of the slot.java.lang.StringgetName()The slots name.INativeHandlegetNativeHandle(NativeStruct struct, int index)Performance shortcut to access "INativeHandle" in the struct member.INativeObjectgetNativeObject(NativeStruct struct)protected intgetOffset()The offset of the slot relative to the StructDeclaration.shortgetShort(NativeStruct struct, int index)Performance shortcut to access "short" in the struct member.java.lang.StringgetString(NativeStruct struct, int index)Performance shortcut to access "String" in the struct member.java.lang.ObjectgetValue(NativeStruct struct)java.lang.StringgetWideString(NativeStruct struct, int index)Performance shortcut to access "String" (from wide characters) in the struct member.voidsetByte(NativeStruct struct, int index, byte value)Performance shortcut to access "byte" in the struct member.voidsetByteArray(NativeStruct struct, int index, byte[] value, int valueOffset, int valueCount)Performance shortcut to access "byte[]" in the struct member.voidsetCLong(NativeStruct struct, int index, long value)Performance shortcut to access "platform sized long" in the struct member.voidsetInt(NativeStruct struct, int index, int value)Performance shortcut to access "int" in the struct member.voidsetLong(NativeStruct struct, int index, long value)Performance shortcut to access "long" in the struct member.voidsetNativeHandle(NativeStruct struct, int index, INativeHandle value)Performance shortcut to access "INativeHandle" in the struct member.voidsetShort(NativeStruct struct, int index, short value)Performance shortcut to access "short" in the struct member.voidsetString(NativeStruct struct, int index, java.lang.String value)Performance shortcut to access "String" in the struct member.voidsetValue(NativeStruct struct, java.lang.Object value)voidsetWideString(NativeStruct struct, int index, java.lang.String value)Performance shortcut to access "String" (from wide characters) in the struct member.java.lang.StringtoString()
-
-
-
Constructor Detail
-
StructMember
protected StructMember(NativeStructType structType, java.lang.String name, int index, INativeType memberType, int offset)
Create a slot with name "name" and the declaration "memberDeclaration"
-
-
Method Detail
-
getByte
public byte getByte(NativeStruct struct, int index)
Performance shortcut to access "byte" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getByteArray
public byte[] getByteArray(NativeStruct struct, int index, int count)
Performance shortcut to access "byte[]" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getCLong
public long getCLong(NativeStruct struct, int index)
Performance shortcut to access "platform sized long" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getInt
public int getInt(NativeStruct struct, int index)
Performance shortcut to access "int" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getLong
public long getLong(NativeStruct struct, int index)
Performance shortcut to access "long" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getMemberType
protected INativeType getMemberType()
The type declaration of the slot.- Returns:
- The type declaration of the slot.
-
getName
public java.lang.String getName()
The slots name.- Returns:
- The slots name.
-
getNativeHandle
public INativeHandle getNativeHandle(NativeStruct struct, int index)
Performance shortcut to access "INativeHandle" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getNativeObject
public INativeObject getNativeObject(NativeStruct struct)
-
getOffset
protected int getOffset()
The offset of the slot relative to the StructDeclaration.- Returns:
- The offset of the slot relative to the StructDeclaration.
-
getShort
public short getShort(NativeStruct struct, int index)
Performance shortcut to access "short" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getString
public java.lang.String getString(NativeStruct struct, int index)
Performance shortcut to access "String" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
getValue
public java.lang.Object getValue(NativeStruct struct)
-
getWideString
public java.lang.String getWideString(NativeStruct struct, int index)
Performance shortcut to access "String" (from wide characters) in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base- Returns:
-
setByte
public void setByte(NativeStruct struct, int index, byte value)
Performance shortcut to access "byte" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setByteArray
public void setByteArray(NativeStruct struct, int index, byte[] value, int valueOffset, int valueCount)
Performance shortcut to access "byte[]" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setCLong
public void setCLong(NativeStruct struct, int index, long value)
Performance shortcut to access "platform sized long" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setInt
public void setInt(NativeStruct struct, int index, int value)
Performance shortcut to access "int" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setLong
public void setLong(NativeStruct struct, int index, long value)
Performance shortcut to access "long" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setNativeHandle
public void setNativeHandle(NativeStruct struct, int index, INativeHandle value)
Performance shortcut to access "INativeHandle" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setShort
public void setShort(NativeStruct struct, int index, short value)
Performance shortcut to access "short" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setString
public void setString(NativeStruct struct, int index, java.lang.String value)
Performance shortcut to access "String" in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
setValue
public void setValue(NativeStruct struct, java.lang.Object value)
-
setWideString
public void setWideString(NativeStruct struct, int index, java.lang.String value)
Performance shortcut to access "String" (from wide characters) in the struct member.- Parameters:
struct- The container struct instanceindex- The memory offset from the struct member base
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-