Package org.lwjgl.llvm
Class LTOObjectBuffer
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.llvm.LTOObjectBuffer
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class LTOObjectBuffer extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceType to wrap a single object returned byThinLTO.Layout
struct LTOObjectBuffer { char const * Buffer; size_t Size; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLTOObjectBuffer.BufferAn array ofLTOObjectBufferstructs.
-
Constructor Summary
Constructors Constructor Description LTOObjectBuffer(java.nio.ByteBuffer container)Creates aLTOObjectBufferinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.nio.ByteBufferBuffer()static LTOObjectBuffercalloc()Returns a newLTOObjectBufferinstance allocated withmemCalloc.static LTOObjectBuffer.Buffercalloc(int capacity)Returns a newLTOObjectBuffer.Bufferinstance allocated withmemCalloc.static LTOObjectBuffer.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newLTOObjectBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static LTOObjectBuffercalloc(org.lwjgl.system.MemoryStack stack)Returns a newLTOObjectBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static LTOObjectBuffercallocStack()Deprecated.static LTOObjectBuffer.BuffercallocStack(int capacity)Deprecated.static LTOObjectBuffer.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static LTOObjectBuffercallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static LTOObjectBuffercreate()Returns a newLTOObjectBufferinstance allocated withBufferUtils.static LTOObjectBuffer.Buffercreate(int capacity)Returns a newLTOObjectBuffer.Bufferinstance allocated withBufferUtils.static LTOObjectBuffercreate(long address)Returns a newLTOObjectBufferinstance for the specified memory address.static LTOObjectBuffer.Buffercreate(long address, int capacity)Create aLTOObjectBuffer.Bufferinstance at the specified memory.static LTOObjectBuffercreateSafe(long address)static LTOObjectBuffer.BuffercreateSafe(long address, int capacity)static LTOObjectBuffermalloc()Returns a newLTOObjectBufferinstance allocated withmemAlloc.static LTOObjectBuffer.Buffermalloc(int capacity)Returns a newLTOObjectBuffer.Bufferinstance allocated withmemAlloc.static LTOObjectBuffer.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newLTOObjectBuffer.Bufferinstance allocated on the specifiedMemoryStack.static LTOObjectBuffermalloc(org.lwjgl.system.MemoryStack stack)Returns a newLTOObjectBufferinstance allocated on the specifiedMemoryStack.static LTOObjectBuffermallocStack()Deprecated.static LTOObjectBuffer.BuffermallocStack(int capacity)Deprecated.static LTOObjectBuffer.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static LTOObjectBuffermallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static java.nio.ByteBuffernBuffer(long struct)Unsafe version ofBuffer.static longnSize(long struct)Unsafe version ofSize().longSize()intsizeof()
-
-
-
Constructor Detail
-
LTOObjectBuffer
public LTOObjectBuffer(java.nio.ByteBuffer container)
Creates aLTOObjectBufferinstance 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
-
Buffer
public java.nio.ByteBuffer Buffer()
- Returns:
- a
ByteBufferview of the data pointed to by theBufferfield.
-
Size
public long Size()
- Returns:
- the value of the
Sizefield.
-
malloc
public static LTOObjectBuffer malloc()
Returns a newLTOObjectBufferinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static LTOObjectBuffer calloc()
Returns a newLTOObjectBufferinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static LTOObjectBuffer create()
Returns a newLTOObjectBufferinstance allocated withBufferUtils.
-
create
public static LTOObjectBuffer create(long address)
Returns a newLTOObjectBufferinstance for the specified memory address.
-
createSafe
@Nullable public static LTOObjectBuffer createSafe(long address)
-
malloc
public static LTOObjectBuffer.Buffer malloc(int capacity)
Returns a newLTOObjectBuffer.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static LTOObjectBuffer.Buffer calloc(int capacity)
Returns a newLTOObjectBuffer.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static LTOObjectBuffer.Buffer create(int capacity)
Returns a newLTOObjectBuffer.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static LTOObjectBuffer.Buffer create(long address, int capacity)
Create aLTOObjectBuffer.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static LTOObjectBuffer.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static LTOObjectBuffer mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static LTOObjectBuffer callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static LTOObjectBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static LTOObjectBuffer callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static LTOObjectBuffer.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static LTOObjectBuffer.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static LTOObjectBuffer.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 LTOObjectBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static LTOObjectBuffer malloc(org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static LTOObjectBuffer calloc(org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static LTOObjectBuffer.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static LTOObjectBuffer.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nBuffer
public static java.nio.ByteBuffer nBuffer(long struct)
Unsafe version ofBuffer.
-
nSize
public static long nSize(long struct)
Unsafe version ofSize().
-
-