Package org.lwjgl.util.tinyexr
Class EXRAttribute
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.tinyexr.EXRAttribute
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class EXRAttribute extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct EXRAttribute { char name[256]; char type[256]; unsigned char * value; int size; char[4]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EXRAttribute.Buffer
An array ofEXRAttribute
structs.
-
Constructor Summary
Constructors Constructor Description EXRAttribute(java.nio.ByteBuffer container)
Creates aEXRAttribute
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EXRAttribute
calloc()
Returns a newEXRAttribute
instance allocated withmemCalloc
.static EXRAttribute.Buffer
calloc(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated withmemCalloc
.static EXRAttribute
callocStack()
Returns a newEXRAttribute
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static EXRAttribute.Buffer
callocStack(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static EXRAttribute.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static EXRAttribute
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static EXRAttribute
create()
Returns a newEXRAttribute
instance allocated withBufferUtils
.static EXRAttribute.Buffer
create(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated withBufferUtils
.static EXRAttribute
create(long address)
Returns a newEXRAttribute
instance for the specified memory address.static EXRAttribute.Buffer
create(long address, int capacity)
Create aEXRAttribute.Buffer
instance at the specified memory.static EXRAttribute
createSafe(long address)
static EXRAttribute.Buffer
createSafe(long address, int capacity)
static EXRAttribute
malloc()
Returns a newEXRAttribute
instance allocated withmemAlloc
.static EXRAttribute.Buffer
malloc(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated withmemAlloc
.static EXRAttribute
mallocStack()
Returns a newEXRAttribute
instance allocated on the thread-localMemoryStack
.static EXRAttribute.Buffer
mallocStack(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated on the thread-localMemoryStack
.static EXRAttribute.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute.Buffer
instance allocated on the specifiedMemoryStack
.static EXRAttribute
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute
instance allocated on the specifiedMemoryStack
.java.nio.ByteBuffer
name()
Returns aByteBuffer
view of thename
field.EXRAttribute
name(java.nio.ByteBuffer value)
Copies the specified encoded string to thename
field.java.lang.String
nameString()
Decodes the null-terminated string stored in thename
field.static java.nio.ByteBuffer
nname(long struct)
Unsafe version ofname()
.static void
nname(long struct, java.nio.ByteBuffer value)
Unsafe version ofname
.static java.lang.String
nnameString(long struct)
Unsafe version ofnameString()
.static int
nsize(long struct)
Unsafe version ofsize()
.static void
nsize(long struct, int value)
Sets the specified value to thesize
field of the specifiedstruct
.static java.nio.ByteBuffer
ntype(long struct)
Unsafe version oftype()
.static void
ntype(long struct, java.nio.ByteBuffer value)
Unsafe version oftype
.static java.lang.String
ntypeString(long struct)
Unsafe version oftypeString()
.static java.nio.ByteBuffer
nvalue(long struct)
Unsafe version ofvalue
.static void
nvalue(long struct, java.nio.ByteBuffer value)
Unsafe version ofvalue
.EXRAttribute
set(java.nio.ByteBuffer name, java.nio.ByteBuffer type, java.nio.ByteBuffer value)
Initializes this struct with the specified values.EXRAttribute
set(EXRAttribute src)
Copies the specified struct data to this struct.int
size()
Returns the value of thesize
field.int
sizeof()
java.nio.ByteBuffer
type()
Returns aByteBuffer
view of thetype
field.EXRAttribute
type(java.nio.ByteBuffer value)
Copies the specified encoded string to thetype
field.java.lang.String
typeString()
Decodes the null-terminated string stored in thetype
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.java.nio.ByteBuffer
value()
Returns aByteBuffer
view of the data pointed to by thevalue
field.EXRAttribute
value(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thevalue
field.
-
-
-
Constructor Detail
-
EXRAttribute
public EXRAttribute(java.nio.ByteBuffer container)
Creates aEXRAttribute
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
-
name
public java.nio.ByteBuffer name()
Returns aByteBuffer
view of thename
field.
-
nameString
public java.lang.String nameString()
Decodes the null-terminated string stored in thename
field.
-
type
public java.nio.ByteBuffer type()
Returns aByteBuffer
view of thetype
field.
-
typeString
public java.lang.String typeString()
Decodes the null-terminated string stored in thetype
field.
-
value
@Nullable public java.nio.ByteBuffer value()
Returns aByteBuffer
view of the data pointed to by thevalue
field.
-
size
public int size()
Returns the value of thesize
field.
-
name
public EXRAttribute name(java.nio.ByteBuffer value)
Copies the specified encoded string to thename
field.
-
type
public EXRAttribute type(java.nio.ByteBuffer value)
Copies the specified encoded string to thetype
field.
-
value
public EXRAttribute value(@Nullable java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thevalue
field.
-
set
public EXRAttribute set(java.nio.ByteBuffer name, java.nio.ByteBuffer type, @Nullable java.nio.ByteBuffer value)
Initializes this struct with the specified values.
-
set
public EXRAttribute set(EXRAttribute src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static EXRAttribute malloc()
Returns a newEXRAttribute
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static EXRAttribute calloc()
Returns a newEXRAttribute
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static EXRAttribute create()
Returns a newEXRAttribute
instance allocated withBufferUtils
.
-
create
public static EXRAttribute create(long address)
Returns a newEXRAttribute
instance for the specified memory address.
-
createSafe
@Nullable public static EXRAttribute createSafe(long address)
-
malloc
public static EXRAttribute.Buffer malloc(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static EXRAttribute.Buffer calloc(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static EXRAttribute.Buffer create(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static EXRAttribute.Buffer create(long address, int capacity)
Create aEXRAttribute.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static EXRAttribute.Buffer createSafe(long address, int capacity)
-
mallocStack
public static EXRAttribute mallocStack()
Returns a newEXRAttribute
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static EXRAttribute callocStack()
Returns a newEXRAttribute
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static EXRAttribute mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static EXRAttribute callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static EXRAttribute.Buffer mallocStack(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static EXRAttribute.Buffer callocStack(int capacity)
Returns a newEXRAttribute.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static EXRAttribute.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static EXRAttribute.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRAttribute.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nname
public static java.nio.ByteBuffer nname(long struct)
Unsafe version ofname()
.
-
nnameString
public static java.lang.String nnameString(long struct)
Unsafe version ofnameString()
.
-
ntype
public static java.nio.ByteBuffer ntype(long struct)
Unsafe version oftype()
.
-
ntypeString
public static java.lang.String ntypeString(long struct)
Unsafe version oftypeString()
.
-
nvalue
@Nullable public static java.nio.ByteBuffer nvalue(long struct)
Unsafe version ofvalue
.
-
nsize
public static int nsize(long struct)
Unsafe version ofsize()
.
-
nname
public static void nname(long struct, java.nio.ByteBuffer value)
Unsafe version ofname
.
-
ntype
public static void ntype(long struct, java.nio.ByteBuffer value)
Unsafe version oftype
.
-
nvalue
public static void nvalue(long struct, @Nullable java.nio.ByteBuffer value)
Unsafe version ofvalue
.
-
nsize
public static void nsize(long struct, int value)
Sets the specified value to thesize
field of the specifiedstruct
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-