Package org.lwjgl.llvm
Class CXUnsavedFile
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CXUnsavedFile>
org.lwjgl.llvm.CXUnsavedFile
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CXUnsavedFile
extends org.lwjgl.system.Struct<CXUnsavedFile>
implements org.lwjgl.system.NativeResource
Provides the contents of a file that has not yet been saved to disk.
Each CXUnsavedFile instance provides the name of a file on the system along with the current contents of that file that have not yet been saved
to disk.
Layout
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
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.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, org.lwjgl.system.MemoryStack stack) Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXUnsavedFilecalloc(org.lwjgl.system.MemoryStack stack) Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CXUnsavedFileDeprecated.static CXUnsavedFile.BuffercallocStack(int capacity) Deprecated.static CXUnsavedFile.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CXUnsavedFilecallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.Contents()a buffer containing the unsaved contents of this fileContents(ByteBuffer value) Sets the address of the specifiedByteBufferto theContents()field.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()the file whose contents have not yet been saved.Filename(ByteBuffer value) Sets the address of the specified encoded string to theFilename()field.the file whose contents have not yet been saved.longLength()the length of the unsaved contents of this bufferstatic CXUnsavedFilemalloc()Returns a newCXUnsavedFileinstance allocated withmemAlloc.static CXUnsavedFile.Buffermalloc(int capacity) Returns a newCXUnsavedFile.Bufferinstance allocated withmemAlloc.static CXUnsavedFile.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStack.static CXUnsavedFilemalloc(org.lwjgl.system.MemoryStack stack) Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStack.static CXUnsavedFileDeprecated.static CXUnsavedFile.BuffermallocStack(int capacity) Deprecated.static CXUnsavedFile.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CXUnsavedFilemallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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()static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<CXUnsavedFile>
-
Filename
the file whose contents have not yet been saved.This file must already exist in the file system.
-
FilenameString
the file whose contents have not yet been saved.This file must already exist in the file system.
-
Contents
a buffer containing the unsaved contents of this file -
Length
public long Length()the length of the unsaved contents of this buffer -
Filename
Sets the address of the specified encoded string to theFilename()field. -
Contents
Sets the address of the specifiedByteBufferto theContents()field. -
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
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static CXUnsavedFile.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 CXUnsavedFile.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
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
-