Package de.intarsys.nativec.type
Class StructMember
java.lang.Object
de.intarsys.nativec.type.StructMember
A field definition within a
NativeStructType
.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StructMember
(NativeStructType structType, String name, int index, INativeType memberType, int offset) Create a slot with name "name" and the declaration "memberDeclaration" -
Method Summary
Modifier and TypeMethodDescriptionbyte
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
The type declaration of the slot.getName()
The slots name.getNativeHandle
(NativeStruct struct, int index) Performance shortcut to access "INativeHandle" in the struct member.getNativeObject
(NativeStruct struct) protected int
The offset of the slot relative to the StructDeclaration.short
getShort
(NativeStruct struct, int index) Performance shortcut to access "short" in the struct member.getString
(NativeStruct struct, int index) Performance shortcut to access "String" in the struct member.getValue
(NativeStruct struct) 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, String value) Performance shortcut to access "String" in the struct member.void
setValue
(NativeStruct struct, Object value) void
setWideString
(NativeStruct struct, int index, String value) Performance shortcut to access "String" (from wide characters) in the struct member.toString()
-
Field Details
-
name
The members name -
index
protected final int indexthe index of the member within the struct
-
-
Constructor Details
-
StructMember
protected StructMember(NativeStructType structType, String name, int index, INativeType memberType, int offset) Create a slot with name "name" and the declaration "memberDeclaration"
-
-
Method Details
-
getByte
Performance shortcut to access "byte" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base- Returns:
- The byte at index within the memory range of struct
-
getByteArray
Performance shortcut to access "byte[]" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base- Returns:
- The byte array starting at index of length count within the memory range of struct
-
getCLong
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:
- The platform sized long at index within the memory range of struct
-
getInt
Performance shortcut to access "int" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base- Returns:
- The int at index within the memory range of struct
-
getLong
Performance shortcut to access "long" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base- Returns:
- The long at index within the memory range of struct
-
getMemberType
The type declaration of the slot.- Returns:
- The type declaration of the slot.
-
getName
The slots name.- Returns:
- The slots name.
-
getNativeHandle
Performance shortcut to access "INativeHandle" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base- Returns:
- The INativeHandle at index within the memory range of struct
-
getNativeObject
-
getOffset
protected int getOffset()The offset of the slot relative to the StructDeclaration.- Returns:
- The offset of the slot relative to the StructDeclaration.
-
getShort
Performance shortcut to access "short" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base- Returns:
- The short at index within the memory range of struct
-
getString
Performance shortcut to access "String" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base- Returns:
- The String at index within the memory range of struct
-
getValue
-
getWideString
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:
- The wide character String at index within the memory range of struct
-
setByte
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
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
Performance shortcut to access "int" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base
-
setLong
Performance shortcut to access "long" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base
-
setNativeHandle
Performance shortcut to access "INativeHandle" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base
-
setShort
Performance shortcut to access "short" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base
-
setString
Performance shortcut to access "String" in the struct member.- Parameters:
struct
- The container struct instanceindex
- The memory offset from the struct member base
-
setValue
-
setWideString
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
-