de.intarsys.nativec.type
Class NativeBufferType
java.lang.Object
de.intarsys.nativec.type.NativeType
de.intarsys.nativec.type.NativeBufferType
- All Implemented Interfaces:
- INativeType
public class NativeBufferType
- extends NativeType
The meta class implementation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NativeBufferType
protected NativeBufferType()
NativeBufferType
protected NativeBufferType(int bufferSize)
create
public static NativeBufferType create(int size)
createNative
public INativeObject createNative(INativeHandle handle)
- Description copied from interface:
INativeType
- Create a new
INativeObject
from a INativeHandle
.
- Specified by:
createNative
in interface INativeType
- Overrides:
createNative
in class NativeType
- 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 interface INativeType
- Overrides:
getByteCount
in class NativeType
- 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.