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.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.static final intThe 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 aSpvcReflectedResourceinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintbase_type_id(int value) Sets the specified value to thebase_type_idfield.static SpvcReflectedResourcecalloc()Returns a newSpvcReflectedResourceinstance allocated withmemCalloc.static SpvcReflectedResource.Buffercalloc(int capacity) Returns a newSpvcReflectedResource.Bufferinstance allocated withmemCalloc.static SpvcReflectedResource.Buffercalloc(int capacity, MemoryStack stack) Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcReflectedResourcecalloc(MemoryStack stack) Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcReflectedResourcecreate()Returns a newSpvcReflectedResourceinstance allocated withBufferUtils.static SpvcReflectedResource.Buffercreate(int capacity) Returns a newSpvcReflectedResource.Bufferinstance allocated withBufferUtils.static SpvcReflectedResourcecreate(long address) Returns a newSpvcReflectedResourceinstance for the specified memory address.static SpvcReflectedResource.Buffercreate(long address, int capacity) Create aSpvcReflectedResource.Bufferinstance at the specified memory.static @Nullable SpvcReflectedResourcecreateSafe(long address) static @Nullable SpvcReflectedResource.BuffercreateSafe(long address, int capacity) intid()id(int value) Sets the specified value to theidfield.static SpvcReflectedResourcemalloc()Returns a newSpvcReflectedResourceinstance allocated withmemAlloc.static SpvcReflectedResource.Buffermalloc(int capacity) Returns a newSpvcReflectedResource.Bufferinstance allocated withmemAlloc.static SpvcReflectedResource.Buffermalloc(int capacity, MemoryStack stack) Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStack.static SpvcReflectedResourcemalloc(MemoryStack stack) Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStack.name()name(ByteBuffer value) Sets the address of the specified encoded string to thenamefield.static intnbase_type_id(long struct) Unsafe version ofbase_type_id().static voidnbase_type_id(long struct, int value) Unsafe version ofbase_type_id.static intnid(long struct) Unsafe version ofid().static voidnid(long struct, int value) Unsafe version ofid.static ByteBuffernname(long struct) Unsafe version ofname().static voidnname(long struct, ByteBuffer value) Unsafe version ofname.static StringnnameString(long struct) Unsafe version ofnameString().static intntype_id(long struct) Unsafe version oftype_id().static voidntype_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.intsizeof()Returnssizeof(struct).inttype_id()type_id(int value) Sets the specified value to thetype_idfield.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. -
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 aSpvcReflectedResourceinstance 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<SpvcReflectedResource>
-
id
public int id()- Returns:
- the value of the
idfield.
-
base_type_id
public int base_type_id()- Returns:
- the value of the
base_type_idfield.
-
type_id
public int type_id()- Returns:
- the value of the
type_idfield.
-
name
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thenamefield.
-
nameString
- Returns:
- the null-terminated string pointed to by the
namefield.
-
id
Sets the specified value to theidfield. -
base_type_id
Sets the specified value to thebase_type_idfield. -
type_id
Sets the specified value to thetype_idfield. -
name
Sets the address of the specified encoded string to thenamefield. -
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 newSpvcReflectedResourceinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSpvcReflectedResourceinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSpvcReflectedResourceinstance allocated withBufferUtils. -
create
Returns a newSpvcReflectedResourceinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSpvcReflectedResource.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSpvcReflectedResource.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSpvcReflectedResource.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSpvcReflectedResource.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStackand 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
-