Package org.lwjgl.assimp
Class AIString
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIString
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class AIString extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceRepresents an UTF-8 string, zero byte terminated.Member documentation
length– Binary length of the string excluding the terminal 0.data[Assimp.MAXLEN]– String buffer.
Layout
struct aiString { size_t length; char data[Assimp.MAXLEN]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAIString.BufferAn array ofAIStringstructs.
-
Constructor Summary
Constructors Constructor Description AIString(java.nio.ByteBuffer container)Creates aAIStringinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIStringcalloc()Returns a newAIStringinstance allocated withmemCalloc.static AIString.Buffercalloc(int capacity)Returns a newAIString.Bufferinstance allocated withmemCalloc.static AIStringcallocStack()Returns a newAIStringinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIString.BuffercallocStack(int capacity)Returns a newAIString.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIString.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIString.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIStringcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIStringinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIStringcreate()Returns a newAIStringinstance allocated withBufferUtils.static AIString.Buffercreate(int capacity)Returns a newAIString.Bufferinstance allocated withBufferUtils.static AIStringcreate(long address)Returns a newAIStringinstance for the specified memory address.static AIString.Buffercreate(long address, int capacity)Create aAIString.Bufferinstance at the specified memory.static AIStringcreateSafe(long address)static AIString.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferdata()Returns aByteBufferview of thedatafield.AIStringdata(java.nio.ByteBuffer value)Copies the specified encoded string to thedatafield.java.lang.StringdataString()Decodes the null-terminated string stored in thedatafield.longlength()Returns the value of thelengthfield.static AIStringmalloc()Returns a newAIStringinstance allocated withmemAlloc.static AIString.Buffermalloc(int capacity)Returns a newAIString.Bufferinstance allocated withmemAlloc.static AIStringmallocStack()Returns a newAIStringinstance allocated on the thread-localMemoryStack.static AIString.BuffermallocStack(int capacity)Returns a newAIString.Bufferinstance allocated on the thread-localMemoryStack.static AIString.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIString.Bufferinstance allocated on the specifiedMemoryStack.static AIStringmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIStringinstance allocated on the specifiedMemoryStack.static java.nio.ByteBufferndata(long struct)Unsafe version ofdata().static voidndata(long struct, java.nio.ByteBuffer value)Unsafe version ofdata.static java.lang.StringndataString(long struct)Unsafe version ofdataString().static longnlength(long struct)Unsafe version oflength().static voidnlength(long struct, long value)Sets the specified value to thelengthfield of the specifiedstruct.AIStringset(AIString src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
AIString
public AIString(java.nio.ByteBuffer container)
Creates aAIStringinstance 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
-
length
public long length()
Returns the value of thelengthfield.
-
data
public java.nio.ByteBuffer data()
Returns aByteBufferview of thedatafield.
-
dataString
public java.lang.String dataString()
Decodes the null-terminated string stored in thedatafield.
-
data
public AIString data(java.nio.ByteBuffer value)
Copies the specified encoded string to thedatafield.
-
set
public AIString set(AIString src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static AIString malloc()
Returns a newAIStringinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static AIString calloc()
Returns a newAIStringinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static AIString create()
Returns a newAIStringinstance allocated withBufferUtils.
-
create
public static AIString create(long address)
Returns a newAIStringinstance for the specified memory address.
-
createSafe
@Nullable public static AIString createSafe(long address)
-
malloc
public static AIString.Buffer malloc(int capacity)
Returns a newAIString.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static AIString.Buffer calloc(int capacity)
Returns a newAIString.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static AIString.Buffer create(int capacity)
Returns a newAIString.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static AIString.Buffer create(long address, int capacity)
Create aAIString.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static AIString.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIString mallocStack()
Returns a newAIStringinstance allocated on the thread-localMemoryStack.
-
callocStack
public static AIString callocStack()
Returns a newAIStringinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static AIString mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIStringinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static AIString callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIStringinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static AIString.Buffer mallocStack(int capacity)
Returns a newAIString.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static AIString.Buffer callocStack(int capacity)
Returns a newAIString.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static AIString.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIString.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static AIString.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIString.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nlength
public static long nlength(long struct)
Unsafe version oflength().
-
ndata
public static java.nio.ByteBuffer ndata(long struct)
Unsafe version ofdata().
-
ndataString
public static java.lang.String ndataString(long struct)
Unsafe version ofdataString().
-
nlength
public static void nlength(long struct, long value)Sets the specified value to thelengthfield of the specifiedstruct.
-
ndata
public static void ndata(long struct, java.nio.ByteBuffer value)Unsafe version ofdata.
-
-