Package org.lwjgl.llvm
Class CXUnsavedFile
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.llvm.CXUnsavedFile
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CXUnsavedFile extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceProvides the contents of a file that has not yet been saved to disk.Each
CXUnsavedFileinstance 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 longLength(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCXUnsavedFile.BufferAn array ofCXUnsavedFilestructs.
-
Constructor Summary
Constructors Constructor Description CXUnsavedFile(java.nio.ByteBuffer container)Creates aCXUnsavedFileinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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 CXUnsavedFilecallocStack()Deprecated.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.java.nio.ByteBufferContents()a buffer containing the unsaved contents of this fileCXUnsavedFileContents(java.nio.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 CXUnsavedFilecreateSafe(long address)static CXUnsavedFile.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferFilename()the file whose contents have not yet been saved.CXUnsavedFileFilename(java.nio.ByteBuffer value)Sets the address of the specified encoded string to theFilename()field.java.lang.StringFilenameString()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 CXUnsavedFilemallocStack()Deprecated.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 java.nio.ByteBuffernContents(long struct)Unsafe version ofContents.static voidnContents(long struct, java.nio.ByteBuffer value)Unsafe version ofContents.static java.nio.ByteBuffernFilename(long struct)Unsafe version ofFilename().static voidnFilename(long struct, java.nio.ByteBuffer value)Unsafe version ofFilename.static java.lang.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.CXUnsavedFileset(java.nio.ByteBuffer Filename, java.nio.ByteBuffer Contents)Initializes this struct with the specified values.CXUnsavedFileset(CXUnsavedFile src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
CXUnsavedFile
public CXUnsavedFile(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
Filename, FilenameString
public java.nio.ByteBuffer Filename() public java.lang.String FilenameString()
the file whose contents have not yet been saved.This file must already exist in the file system.
-
Contents
public java.nio.ByteBuffer Contents()
a buffer containing the unsaved contents of this file
-
Length
public long Length()
the length of the unsaved contents of this buffer
-
Filename
public CXUnsavedFile Filename(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to theFilename()field.
-
Contents
public CXUnsavedFile Contents(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto theContents()field.
-
set
public CXUnsavedFile set(java.nio.ByteBuffer Filename, java.nio.ByteBuffer Contents)
Initializes this struct with the specified values.
-
set
public CXUnsavedFile set(CXUnsavedFile src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static CXUnsavedFile malloc()
Returns a newCXUnsavedFileinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CXUnsavedFile calloc()
Returns a newCXUnsavedFileinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CXUnsavedFile create()
Returns a newCXUnsavedFileinstance allocated withBufferUtils.
-
create
public static CXUnsavedFile create(long address)
Returns a newCXUnsavedFileinstance for the specified memory address.
-
createSafe
@Nullable public static CXUnsavedFile createSafe(long address)
-
malloc
public static CXUnsavedFile.Buffer malloc(int capacity)
Returns a newCXUnsavedFile.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CXUnsavedFile.Buffer calloc(int capacity)
Returns a newCXUnsavedFile.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CXUnsavedFile.Buffer create(int capacity)
Returns a newCXUnsavedFile.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CXUnsavedFile.Buffer create(long address, int capacity)
Create aCXUnsavedFile.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CXUnsavedFile.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CXUnsavedFile mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CXUnsavedFile callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CXUnsavedFile mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static CXUnsavedFile callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static CXUnsavedFile.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static CXUnsavedFile.Buffer callocStack(int capacity)
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
public static CXUnsavedFile malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CXUnsavedFile calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCXUnsavedFileinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static CXUnsavedFile.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static CXUnsavedFile.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCXUnsavedFile.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nFilename
public static java.nio.ByteBuffer nFilename(long struct)
Unsafe version ofFilename().
-
nFilenameString
public static java.lang.String nFilenameString(long struct)
Unsafe version ofFilenameString().
-
nContents
public static java.nio.ByteBuffer nContents(long struct)
Unsafe version ofContents.
-
nLength
public static long nLength(long struct)
Unsafe version ofLength().
-
nFilename
public static void nFilename(long struct, java.nio.ByteBuffer value)Unsafe version ofFilename.
-
nContents
public static void nContents(long struct, java.nio.ByteBuffer value)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
-
-