Package org.lwjgl.util.spvc
Class SpvcReflectedResource
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct spvc_reflected_resource {
spvc_variable_id id;
spvc_type_id base_type_id;
spvc_type_id type_id;
char const * name;
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionSpvcReflectedResource
(ByteBuffer container) Creates aSpvcReflectedResource
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
base_type_id
(int value) Sets the specified value to thebase_type_id
field.static SpvcReflectedResource
calloc()
Returns a newSpvcReflectedResource
instance allocated withmemCalloc
.static SpvcReflectedResource.Buffer
calloc
(int capacity) Returns a newSpvcReflectedResource.Buffer
instance allocated withmemCalloc
.static SpvcReflectedResource.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSpvcReflectedResource.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SpvcReflectedResource
calloc
(MemoryStack stack) Returns a newSpvcReflectedResource
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SpvcReflectedResource
create()
Returns a newSpvcReflectedResource
instance allocated withBufferUtils
.static SpvcReflectedResource.Buffer
create
(int capacity) Returns a newSpvcReflectedResource.Buffer
instance allocated withBufferUtils
.static SpvcReflectedResource
create
(long address) Returns a newSpvcReflectedResource
instance for the specified memory address.static SpvcReflectedResource.Buffer
create
(long address, int capacity) Create aSpvcReflectedResource.Buffer
instance at the specified memory.static @Nullable SpvcReflectedResource
createSafe
(long address) static @Nullable SpvcReflectedResource.Buffer
createSafe
(long address, int capacity) int
id()
id
(int value) Sets the specified value to theid
field.static SpvcReflectedResource
malloc()
Returns a newSpvcReflectedResource
instance allocated withmemAlloc
.static SpvcReflectedResource.Buffer
malloc
(int capacity) Returns a newSpvcReflectedResource.Buffer
instance allocated withmemAlloc
.static SpvcReflectedResource.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSpvcReflectedResource.Buffer
instance allocated on the specifiedMemoryStack
.static SpvcReflectedResource
malloc
(MemoryStack stack) Returns a newSpvcReflectedResource
instance allocated on the specifiedMemoryStack
.name()
name
(ByteBuffer value) Sets the address of the specified encoded string to thename
field.static int
nbase_type_id
(long struct) Unsafe version ofbase_type_id()
.static void
nbase_type_id
(long struct, int value) Unsafe version ofbase_type_id
.static int
nid
(long struct) Unsafe version ofid()
.static void
nid
(long struct, int value) Unsafe version ofid
.static ByteBuffer
nname
(long struct) Unsafe version ofname()
.static void
nname
(long struct, ByteBuffer value) Unsafe version ofname
.static String
nnameString
(long struct) Unsafe version ofnameString()
.static int
ntype_id
(long struct) Unsafe version oftype_id()
.static void
ntype_id
(long struct, int value) Unsafe version oftype_id
.set
(int id, int base_type_id, int type_id, ByteBuffer name) Initializes this struct with the specified values.set
(SpvcReflectedResource src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
type_id()
type_id
(int value) Sets the specified value to thetype_id
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
ID
public static final int IDThe struct member offsets. -
BASE_TYPE_ID
public static final int BASE_TYPE_IDThe struct member offsets. -
TYPE_ID
public static final int TYPE_IDThe struct member offsets. -
NAME
public static final int NAMEThe struct member offsets.
-
-
Constructor Details
-
SpvcReflectedResource
Creates aSpvcReflectedResource
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<SpvcReflectedResource>
-
id
public int id()- Returns:
- the value of the
id
field.
-
base_type_id
public int base_type_id()- Returns:
- the value of the
base_type_id
field.
-
type_id
public int type_id()- Returns:
- the value of the
type_id
field.
-
name
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by thename
field.
-
nameString
- Returns:
- the null-terminated string pointed to by the
name
field.
-
id
Sets the specified value to theid
field. -
base_type_id
Sets the specified value to thebase_type_id
field. -
type_id
Sets the specified value to thetype_id
field. -
name
Sets the address of the specified encoded string to thename
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 newSpvcReflectedResource
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSpvcReflectedResource
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSpvcReflectedResource
instance allocated withBufferUtils
. -
create
Returns a newSpvcReflectedResource
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSpvcReflectedResource.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSpvcReflectedResource.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSpvcReflectedResource.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSpvcReflectedResource.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSpvcReflectedResource
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSpvcReflectedResource
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSpvcReflectedResource.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSpvcReflectedResource.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nid
public static int nid(long struct) Unsafe version ofid()
. -
nbase_type_id
public static int nbase_type_id(long struct) Unsafe version ofbase_type_id()
. -
ntype_id
public static int ntype_id(long struct) Unsafe version oftype_id()
. -
nname
Unsafe version ofname()
. -
nnameString
Unsafe version ofnameString()
. -
nid
public static void nid(long struct, int value) Unsafe version ofid
. -
nbase_type_id
public static void nbase_type_id(long struct, int value) Unsafe version ofbase_type_id
. -
ntype_id
public static void ntype_id(long struct, int value) Unsafe version oftype_id
. -
nname
Unsafe version ofname
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-