Package de.intarsys.nativec.type
Interface INativeType
-
- All Known Implementing Classes:
NativeAbstractStringType
,NativeArrayType
,NativeBufferType
,NativeByteType
,NativeIntType
,NativeLongLP64Type
,NativeLongType
,NativeNumberType
,NativeReferenceType
,NativeShortType
,NativeSimpleType
,NativeStringType
,NativeStructType
,NativeType
,NativeVoidType
,NativeWideStringType
public interface INativeType
The type (factory) forINativeObject
instances.A type has declaration style method to create more complex types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description INativeType
Array(int size)
Create an array type from this.INativeObject
createNative(INativeHandle handle)
Create a newINativeObject
from aINativeHandle
.INativeObject
createNative(java.lang.Object value)
Create anINativeObject
for this type from the Java object.int
getByteCount()
The size of the type in c memory.int
getPreferredBoundary()
The boundary where this type as a struct member would want to be aligned.INativeType
Ref()
Create a reference type to this.
-
-
-
Method Detail
-
Array
INativeType Array(int size)
Create an array type from this.- Parameters:
size
- The predefined size for the array.- Returns:
- The derived type.
-
createNative
INativeObject createNative(java.lang.Object value)
Create anINativeObject
for this type from the Java object.- Parameters:
value
-- Returns:
- The new
INativeObject
-
createNative
INativeObject createNative(INativeHandle handle)
Create a newINativeObject
from aINativeHandle
.- Parameters:
handle
- The handle to memory.- Returns:
- The new
INativeObject
-
getPreferredBoundary
int getPreferredBoundary()
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.
-
getByteCount
int getByteCount()
The size of the type in c memory.- Returns:
- The size of the type in c memory.
-
Ref
INativeType Ref()
Create a reference type to this.- Returns:
- The derived type.
-
-