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.NativeResource
Type 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 class
LTOObjectBuffer.Buffer
An array ofLTOObjectBuffer
structs.
-
Constructor Summary
Constructors Constructor Description LTOObjectBuffer(java.nio.ByteBuffer container)
Creates aLTOObjectBuffer
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
Buffer()
Returns aByteBuffer
view of the data pointed to by theBuffer
field.static LTOObjectBuffer
calloc()
Returns a newLTOObjectBuffer
instance allocated withmemCalloc
.static LTOObjectBuffer.Buffer
calloc(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated withmemCalloc
.static LTOObjectBuffer
callocStack()
Returns a newLTOObjectBuffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static LTOObjectBuffer.Buffer
callocStack(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static LTOObjectBuffer.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static LTOObjectBuffer
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static LTOObjectBuffer
create()
Returns a newLTOObjectBuffer
instance allocated withBufferUtils
.static LTOObjectBuffer.Buffer
create(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated withBufferUtils
.static LTOObjectBuffer
create(long address)
Returns a newLTOObjectBuffer
instance for the specified memory address.static LTOObjectBuffer.Buffer
create(long address, int capacity)
Create aLTOObjectBuffer.Buffer
instance at the specified memory.static LTOObjectBuffer
createSafe(long address)
static LTOObjectBuffer.Buffer
createSafe(long address, int capacity)
static LTOObjectBuffer
malloc()
Returns a newLTOObjectBuffer
instance allocated withmemAlloc
.static LTOObjectBuffer.Buffer
malloc(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated withmemAlloc
.static LTOObjectBuffer
mallocStack()
Returns a newLTOObjectBuffer
instance allocated on the thread-localMemoryStack
.static LTOObjectBuffer.Buffer
mallocStack(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the thread-localMemoryStack
.static LTOObjectBuffer.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the specifiedMemoryStack
.static LTOObjectBuffer
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer
instance allocated on the specifiedMemoryStack
.static java.nio.ByteBuffer
nBuffer(long struct)
Unsafe version ofBuffer
.static long
nSize(long struct)
Unsafe version ofSize()
.long
Size()
Returns the value of theSize
field.int
sizeof()
-
-
-
Constructor Detail
-
LTOObjectBuffer
public LTOObjectBuffer(java.nio.ByteBuffer container)
Creates aLTOObjectBuffer
instance at the current position of the specifiedByteBuffer
container. 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:
sizeof
in classorg.lwjgl.system.Struct
-
Buffer
public java.nio.ByteBuffer Buffer()
Returns aByteBuffer
view of the data pointed to by theBuffer
field.
-
Size
public long Size()
Returns the value of theSize
field.
-
malloc
public static LTOObjectBuffer malloc()
Returns a newLTOObjectBuffer
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static LTOObjectBuffer calloc()
Returns a newLTOObjectBuffer
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static LTOObjectBuffer create()
Returns a newLTOObjectBuffer
instance allocated withBufferUtils
.
-
create
public static LTOObjectBuffer create(long address)
Returns a newLTOObjectBuffer
instance for the specified memory address.
-
createSafe
@Nullable public static LTOObjectBuffer createSafe(long address)
-
malloc
public static LTOObjectBuffer.Buffer malloc(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static LTOObjectBuffer.Buffer calloc(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static LTOObjectBuffer.Buffer create(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static LTOObjectBuffer.Buffer create(long address, int capacity)
Create aLTOObjectBuffer.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static LTOObjectBuffer.Buffer createSafe(long address, int capacity)
-
mallocStack
public static LTOObjectBuffer mallocStack()
Returns a newLTOObjectBuffer
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static LTOObjectBuffer callocStack()
Returns a newLTOObjectBuffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static LTOObjectBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static LTOObjectBuffer callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static LTOObjectBuffer.Buffer mallocStack(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static LTOObjectBuffer.Buffer callocStack(int capacity)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static LTOObjectBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static LTOObjectBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLTOObjectBuffer.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
-