Package org.lwjgl.llvm
Class CXType
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.llvm.CXType
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CXType extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceThe type of an element in the abstract syntax tree.Layout
struct CXType { enum CXTypeKind kind; void * data[2]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCXType.BufferAn array ofCXTypestructs.
-
Constructor Summary
Constructors Constructor Description CXType(java.nio.ByteBuffer container)Creates aCXTypeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CXTypecalloc()Returns a newCXTypeinstance allocated withmemCalloc.static CXType.Buffercalloc(int capacity)Returns a newCXType.Bufferinstance allocated withmemCalloc.static CXType.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXTypecalloc(org.lwjgl.system.MemoryStack stack)Returns a newCXTypeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXTypecallocStack()Deprecated.static CXType.BuffercallocStack(int capacity)Deprecated.static CXType.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CXTypecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 CXTypecreateSafe(long address)static CXType.BuffercreateSafe(long address, int capacity)org.lwjgl.PointerBufferdata()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, org.lwjgl.system.MemoryStack stack)Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStack.static CXTypemalloc(org.lwjgl.system.MemoryStack stack)Returns a newCXTypeinstance allocated on the specifiedMemoryStack.static CXTypemallocStack()Deprecated.static CXType.BuffermallocStack(int capacity)Deprecated.static CXType.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CXTypemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static org.lwjgl.PointerBufferndata(long struct)Unsafe version ofdata().static longndata(long struct, int index)Unsafe version ofdata.static intnkind(long struct)Unsafe version ofkind().intsizeof()
-
-
-
Constructor Detail
-
CXType
public CXType(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
kind
public int kind()
- Returns:
- the value of the
kindfield.
-
data
public org.lwjgl.PointerBuffer data()
- Returns:
- a
PointerBufferview of thedatafield.
-
data
public long data(int index)
- Returns:
- the value at the specified index of the
datafield.
-
malloc
public static CXType malloc()
Returns a newCXTypeinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CXType calloc()
Returns a newCXTypeinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CXType create()
Returns a newCXTypeinstance allocated withBufferUtils.
-
create
public static CXType create(long address)
Returns a newCXTypeinstance for the specified memory address.
-
createSafe
@Nullable public static CXType createSafe(long address)
-
malloc
public static CXType.Buffer malloc(int capacity)
Returns a newCXType.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CXType.Buffer calloc(int capacity)
Returns a newCXType.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CXType.Buffer create(int capacity)
Returns a newCXType.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CXType.Buffer create(long address, int capacity)
Create aCXType.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CXType.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CXType mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CXType callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CXType mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CXType callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CXType.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CXType.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static CXType.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CXType.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static CXType malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCXTypeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CXType calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCXTypeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CXType.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CXType.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCXType.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nkind
public static int nkind(long struct)
Unsafe version ofkind().
-
ndata
public static org.lwjgl.PointerBuffer ndata(long struct)
Unsafe version ofdata().
-
ndata
public static long ndata(long struct, int index)Unsafe version ofdata.
-
-