Package org.lwjgl.llvm
Class CXUnsavedFile
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct CXUnsavedFile {
char const * Filename;
char const * Contents;
unsigned long Length;
}-
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 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
ConstructorsConstructorDescriptionCXUnsavedFile(ByteBuffer container) Creates aCXUnsavedFileinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CXUnsavedFilecalloc()Returns a newCXUnsavedFileinstance allocated withmemCalloc.static CXUnsavedFile.Buffercalloc(int capacity) Returns a newCXUnsavedFile.Bufferinstance allocated withmemCalloc.static CXUnsavedFile.Buffercalloc(int capacity, MemoryStack stack) Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXUnsavedFilecalloc(MemoryStack stack) Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.Contents()Contents(ByteBuffer value) Sets the address of the specifiedByteBufferto theContentsfield.static CXUnsavedFilecreate()Returns a newCXUnsavedFileinstance allocated withBufferUtils.static CXUnsavedFile.Buffercreate(int capacity) Returns a newCXUnsavedFile.Bufferinstance allocated withBufferUtils.static CXUnsavedFilecreate(long address) Returns a newCXUnsavedFileinstance for the specified memory address.static CXUnsavedFile.Buffercreate(long address, int capacity) Create aCXUnsavedFile.Bufferinstance at the specified memory.static @Nullable CXUnsavedFilecreateSafe(long address) static @Nullable CXUnsavedFile.BuffercreateSafe(long address, int capacity) Filename()Filename(ByteBuffer value) Sets the address of the specified encoded string to theFilenamefield.longLength()static CXUnsavedFilemalloc()Returns a newCXUnsavedFileinstance allocated withmemAlloc.static CXUnsavedFile.Buffermalloc(int capacity) Returns a newCXUnsavedFile.Bufferinstance allocated withmemAlloc.static CXUnsavedFile.Buffermalloc(int capacity, MemoryStack stack) Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStack.static CXUnsavedFilemalloc(MemoryStack stack) Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStack.static ByteBuffernContents(long struct) Unsafe version ofContents.static voidnContents(long struct, ByteBuffer value) Unsafe version ofContents.static ByteBuffernFilename(long struct) Unsafe version ofFilename().static voidnFilename(long struct, ByteBuffer value) Unsafe version ofFilename.static StringnFilenameString(long struct) Unsafe version ofFilenameString().static longnLength(long struct) Unsafe version ofLength().static voidnLength(long struct, long value) Sets the specified value to theLengthfield of the specifiedstruct.set(ByteBuffer Filename, ByteBuffer Contents) Initializes this struct with the specified values.set(CXUnsavedFile src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
FILENAME
public static final int FILENAMEThe struct member offsets. -
CONTENTS
public static final int CONTENTSThe struct member offsets. -
LENGTH
public static final int LENGTHThe struct member offsets.
-
-
Constructor Details
-
CXUnsavedFile
Creates aCXUnsavedFileinstance 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).- Specified by:
sizeofin classStruct<CXUnsavedFile>
-
Filename
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by theFilenamefield.
-
FilenameString
- Returns:
- the null-terminated string pointed to by the
Filenamefield.
-
Contents
- Returns:
- a
ByteBufferview of the data pointed to by theContentsfield.
-
Length
public long Length()- Returns:
- the value of the
Lengthfield.
-
Filename
Sets the address of the specified encoded string to theFilenamefield. -
Contents
Sets the address of the specifiedByteBufferto theContentsfield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newCXUnsavedFileinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCXUnsavedFileinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCXUnsavedFileinstance allocated withBufferUtils. -
create
Returns a newCXUnsavedFileinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCXUnsavedFile.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCXUnsavedFile.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCXUnsavedFile.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCXUnsavedFile.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nFilename
Unsafe version ofFilename(). -
nFilenameString
Unsafe version ofFilenameString(). -
nContents
Unsafe version ofContents. -
nLength
public static long nLength(long struct) Unsafe version ofLength(). -
nFilename
Unsafe version ofFilename. -
nContents
Unsafe version ofContents. -
nLength
public static void nLength(long struct, long value) Sets the specified value to theLengthfield of the specifiedstruct. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-