Package de.intarsys.nativec.type
Class NativeStructType
java.lang.Object
de.intarsys.nativec.type.NativeType
de.intarsys.nativec.type.NativeStructType
- All Implemented Interfaces:
INativeType
The meta class implementation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeclare
(String name, INativeType declaration) Declare a new member for the struct.int
int
The size of the type in c memory.int
The total size of the StructDeclaration.The collection of StructMember instances in declaration order.int
getNativeObject
(NativeStruct struct, String name) int
int
The boundary where this type as a struct member would want to be aligned.void
setPacking
(int pPacking) toString()
Methods inherited from class de.intarsys.nativec.type.NativeType
Array, createNative, createNative, lookup, Ref, register
-
Constructor Details
-
NativeStructType
protected NativeStructType() -
NativeStructType
-
-
Method Details
-
declare
Declare a new member for the struct.- Parameters:
name
- The name of the new member slot.declaration
- The type declaration for the slot
-
getByteBoundary
public int getByteBoundary() -
getByteCount
public int getByteCount()Description copied from interface:INativeType
The size of the type in c memory.- Specified by:
getByteCount
in interfaceINativeType
- Overrides:
getByteCount
in classNativeType
- Returns:
- The size of the type in c memory.
-
getByteSize
public int getByteSize()The total size of the StructDeclaration.- Returns:
- The total size of the StructDeclaration.
-
getField
-
getFields
The collection of StructMember instances in declaration order.- Returns:
- The collection of StructMember instances in declaration order.
-
getFieldsSize
public int getFieldsSize() -
getNativeObject
-
getPacking
public int getPacking() -
getPreferredBoundary
public int getPreferredBoundary()Description copied from interface:INativeType
The boundary where this type as a struct member would want to be aligned. A structure can override this value with packing.- Returns:
- The preferred alignment boundary.
-
setPacking
public void setPacking(int pPacking) -
toString
-