Package org.lwjgl.llvm
Class CXType
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct CXType {
enum CXTypeKind kind;
void * data[2];
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCXType(ByteBuffer container) Creates aCXTypeinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CXTypecalloc()Returns a newCXTypeinstance allocated withmemCalloc.static CXType.Buffercalloc(int capacity) Returns a newCXType.Bufferinstance allocated withmemCalloc.static CXType.Buffercalloc(int capacity, MemoryStack stack) Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXTypecalloc(MemoryStack stack) Returns a newCXTypeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXTypecreate()Returns a newCXTypeinstance allocated withBufferUtils.static CXType.Buffercreate(int capacity) Returns a newCXType.Bufferinstance allocated withBufferUtils.static CXTypecreate(long address) Returns a newCXTypeinstance for the specified memory address.static CXType.Buffercreate(long address, int capacity) Create aCXType.Bufferinstance at the specified memory.static @Nullable CXTypecreateSafe(long address) static @Nullable CXType.BuffercreateSafe(long address, int capacity) data()longdata(int index) intkind()static CXTypemalloc()Returns a newCXTypeinstance allocated withmemAlloc.static CXType.Buffermalloc(int capacity) Returns a newCXType.Bufferinstance allocated withmemAlloc.static CXType.Buffermalloc(int capacity, MemoryStack stack) Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStack.static CXTypemalloc(MemoryStack stack) Returns a newCXTypeinstance allocated on the specifiedMemoryStack.static PointerBufferndata(long struct) Unsafe version ofdata().static longndata(long struct, int index) Unsafe version ofdata.static intnkind(long struct) Unsafe version ofkind().intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
KIND
public static final int KINDThe struct member offsets. -
DATA
public static final int DATAThe struct member offsets.
-
-
Constructor Details
-
CXType
Creates aCXTypeinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
kind
public int kind()- Returns:
- the value of the
kindfield.
-
data
- Returns:
- a
PointerBufferview of thedatafield.
-
data
public long data(int index) - Returns:
- the value at the specified index of the
datafield.
-
malloc
Returns a newCXTypeinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCXTypeinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCXTypeinstance allocated withBufferUtils. -
create
Returns a newCXTypeinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCXType.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCXType.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCXType.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCXType.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCXTypeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCXTypeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nkind
public static int nkind(long struct) Unsafe version ofkind(). -
ndata
Unsafe version ofdata(). -
ndata
public static long ndata(long struct, int index) Unsafe version ofdata.
-