Package de.intarsys.nativec.type
Class NativeBufferType
java.lang.Object
de.intarsys.nativec.type.NativeType
de.intarsys.nativec.type.NativeBufferType
- All Implemented Interfaces:
INativeType
The meta class implementation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NativeBufferType
create
(int size) createNative
(INativeHandle handle) Create a newINativeObject
from aINativeHandle
.int
int
The size of the type in c memory.int
The boundary where this type as a struct member would want to be aligned.Methods inherited from class de.intarsys.nativec.type.NativeType
Array, createNative, lookup, Ref, register
-
Constructor Details
-
NativeBufferType
protected NativeBufferType() -
NativeBufferType
protected NativeBufferType(int bufferSize)
-
-
Method Details
-
create
-
createNative
Description copied from interface:INativeType
Create a newINativeObject
from aINativeHandle
.- Specified by:
createNative
in interfaceINativeType
- Overrides:
createNative
in classNativeType
- Parameters:
handle
- The handle to memory.- Returns:
- The new
INativeObject
-
getBufferSize
public int getBufferSize() -
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.
-
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.
-