Package org.lwjgl.util.remotery
Class RMTProperty
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<RMTProperty>
org.lwjgl.util.remotery.RMTProperty
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class RMTProperty
extends org.lwjgl.system.Struct<RMTProperty>
implements org.lwjgl.system.NativeResource
Definition of a property that should be stored globally.
Note: Use the callback api and the rmt_PropertyGetxxx accessors to traverse this structure.
Layout
struct rmtProperty {
rmtBool initialised();
rmtPropertyType type();
rmtPropertyFlags flags;
rmtPropertyValue value();
rmtPropertyValue lastFrameValue();
rmtPropertyValue prevValue();
rmtU32 prevValueFrame;
char const * name();
char const * description;
rmtPropertyValue defaultValue();
rmtProperty * parent();
rmtProperty * firstChild();
rmtProperty * lastChild();
rmtProperty * nextSibling();
rmtU32 nameHash();
rmtU32 uniqueID();
}-
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 member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.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.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionRMTProperty(ByteBuffer container) Creates aRMTPropertyinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic RMTPropertycalloc()Returns a newRMTPropertyinstance allocated withmemCalloc.static RMTProperty.Buffercalloc(int capacity) Returns a newRMTProperty.Bufferinstance allocated withmemCalloc.static RMTProperty.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newRMTProperty.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RMTPropertycalloc(org.lwjgl.system.MemoryStack stack) Returns a newRMTPropertyinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RMTPropertycreate()Returns a newRMTPropertyinstance allocated withBufferUtils.static RMTProperty.Buffercreate(int capacity) Returns a newRMTProperty.Bufferinstance allocated withBufferUtils.static RMTPropertycreate(long address) Returns a newRMTPropertyinstance for the specified memory address.static RMTProperty.Buffercreate(long address, int capacity) Create aRMTProperty.Bufferinstance at the specified memory.static @Nullable RMTPropertycreateSafe(long address) static @Nullable RMTProperty.BuffercreateSafe(long address, int capacity) default value for Reset callsdefaultValue(Consumer<RMTPropertyValue> consumer) Passes thedefaultValue()field to the specifiedConsumer.defaultValue(RMTPropertyValue value) Copies the specifiedRMTPropertyValueto thedefaultValue()field.description(ByteBuffer value) Sets the address of the specified encoded string to thedescriptionfield.@Nullable RMTPropertylinks within the property treefirstChild(@Nullable RMTProperty value) Sets the address of the specifiedRMTPropertyto thefirstChild()field.intflags()flags(int value) Sets the specified value to theflagsfield.booleangets set toTRUEafter a property has been modified, when it gets initialised for the first timeinitialised(boolean value) Sets the specified value to theinitialised()field.@Nullable RMTPropertylinks within the property treelastChild(@Nullable RMTProperty value) Sets the address of the specifiedRMTPropertyto thelastChild()field.last frame value to see if previous value needs to be updatedlastFrameValue(Consumer<RMTPropertyValue> consumer) Passes thelastFrameValue()field to the specifiedConsumer.lastFrameValue(RMTPropertyValue value) Copies the specifiedRMTPropertyValueto thelastFrameValue()field.static RMTPropertymalloc()Returns a newRMTPropertyinstance allocated withmemAlloc.static RMTProperty.Buffermalloc(int capacity) Returns a newRMTProperty.Bufferinstance allocated withmemAlloc.static RMTProperty.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newRMTProperty.Bufferinstance allocated on the specifiedMemoryStack.static RMTPropertymalloc(org.lwjgl.system.MemoryStack stack) Returns a newRMTPropertyinstance allocated on the specifiedMemoryStack.name()text descriptionname(ByteBuffer value) Sets the address of the specified encoded string to thename()field.intnameHash()hash for efficient sending of properties to the viewernameHash(int value) Sets the specified value to thenameHash()field.text descriptionstatic RMTPropertyValuendefaultValue(long struct) Unsafe version ofdefaultValue().static voidndefaultValue(long struct, RMTPropertyValue value) Unsafe version ofdefaultValue.static ByteBufferndescription(long struct) Unsafe version ofdescription().static voidndescription(long struct, ByteBuffer value) Unsafe version ofdescription.static StringndescriptionString(long struct) Unsafe version ofdescriptionString().@Nullable RMTPropertylinks within the property treenextSibling(@Nullable RMTProperty value) Sets the address of the specifiedRMTPropertyto thenextSibling()field.static @Nullable RMTPropertynfirstChild(long struct) Unsafe version offirstChild().static voidnfirstChild(long struct, @Nullable RMTProperty value) Unsafe version offirstChild.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static intninitialised(long struct) Unsafe version ofinitialised().static voidninitialised(long struct, int value) Unsafe version ofinitialised.static @Nullable RMTPropertynlastChild(long struct) Unsafe version oflastChild().static voidnlastChild(long struct, @Nullable RMTProperty value) Unsafe version oflastChild.static RMTPropertyValuenlastFrameValue(long struct) Unsafe version oflastFrameValue().static voidnlastFrameValue(long struct, RMTPropertyValue value) Unsafe version oflastFrameValue.static ByteBuffernname(long struct) Unsafe version ofname().static voidnname(long struct, ByteBuffer value) Unsafe version ofname.static intnnameHash(long struct) Unsafe version ofnameHash().static voidnnameHash(long struct, int value) Unsafe version ofnameHash.static StringnnameString(long struct) Unsafe version ofnameString().static @Nullable RMTPropertynnextSibling(long struct) Unsafe version ofnextSibling().static voidnnextSibling(long struct, @Nullable RMTProperty value) Unsafe version ofnextSibling.static @Nullable RMTPropertynparent(long struct) Unsafe version ofparent().static voidnparent(long struct, @Nullable RMTProperty value) Unsafe version ofparent.static RMTPropertyValuenprevValue(long struct) Unsafe version ofprevValue().static voidnprevValue(long struct, RMTPropertyValue value) Unsafe version ofprevValue.static intnprevValueFrame(long struct) Unsafe version ofprevValueFrame().static voidnprevValueFrame(long struct, int value) Unsafe version ofprevValueFrame.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.static intnuniqueID(long struct) Unsafe version ofuniqueID().static voidnuniqueID(long struct, int value) Unsafe version ofuniqueID.static RMTPropertyValuenvalue(long struct) Unsafe version ofvalue().static voidnvalue(long struct, RMTPropertyValue value) Unsafe version ofvalue.@Nullable RMTPropertyparent()parent link specifically placed after default value so that variadic macro can initialise itparent(@Nullable RMTProperty value) Sets the address of the specifiedRMTPropertyto theparent()field.previous value only if it's different from the current value, and when it changedprevValue(Consumer<RMTPropertyValue> consumer) Passes theprevValue()field to the specifiedConsumer.prevValue(RMTPropertyValue value) Copies the specifiedRMTPropertyValueto theprevValue()field.intprevValueFrame(int value) Sets the specified value to theprevValueFramefield.set(boolean initialised, int type, int flags, RMTPropertyValue value, RMTPropertyValue lastFrameValue, RMTPropertyValue prevValue, int prevValueFrame, ByteBuffer name, ByteBuffer description, RMTPropertyValue defaultValue, @Nullable RMTProperty parent, @Nullable RMTProperty firstChild, @Nullable RMTProperty lastChild, @Nullable RMTProperty nextSibling, int nameHash, int uniqueID) Initializes this struct with the specified values.set(RMTProperty src) Copies the specified struct data to this struct.intsizeof()inttype()runtime descriptiontype(int value) Sets the specified value to thetype()field.intuniqueID()unique, persistent ID among all propertiesuniqueID(int value) Sets the specified value to theuniqueID()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.value()current valuevalue(Consumer<RMTPropertyValue> consumer) value(RMTPropertyValue value) Copies the specifiedRMTPropertyValueto thevalue()field.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. -
INITIALISED
public static final int INITIALISEDThe struct member offsets. -
TYPE
public static final int TYPEThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
VALUE
public static final int VALUEThe struct member offsets. -
LASTFRAMEVALUE
public static final int LASTFRAMEVALUEThe struct member offsets. -
PREVVALUE
public static final int PREVVALUEThe struct member offsets. -
PREVVALUEFRAME
public static final int PREVVALUEFRAMEThe struct member offsets. -
NAME
public static final int NAMEThe struct member offsets. -
DESCRIPTION
public static final int DESCRIPTIONThe struct member offsets. -
DEFAULTVALUE
public static final int DEFAULTVALUEThe struct member offsets. -
PARENT
public static final int PARENTThe struct member offsets. -
FIRSTCHILD
public static final int FIRSTCHILDThe struct member offsets. -
LASTCHILD
public static final int LASTCHILDThe struct member offsets. -
NEXTSIBLING
public static final int NEXTSIBLINGThe struct member offsets. -
NAMEHASH
public static final int NAMEHASHThe struct member offsets. -
UNIQUEID
public static final int UNIQUEIDThe struct member offsets.
-
-
Constructor Details
-
RMTProperty
Creates aRMTPropertyinstance 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<RMTProperty>
-
initialised
public boolean initialised()gets set toTRUEafter a property has been modified, when it gets initialised for the first time -
type
public int type()runtime description -
flags
public int flags()- Returns:
- the value of the
flagsfield.
-
value
current value -
lastFrameValue
last frame value to see if previous value needs to be updated -
prevValue
previous value only if it's different from the current value, and when it changed -
prevValueFrame
public int prevValueFrame()- Returns:
- the value of the
prevValueFramefield.
-
name
text description -
nameString
text description -
description
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thedescriptionfield.
-
descriptionString
- Returns:
- the null-terminated string pointed to by the
descriptionfield.
-
defaultValue
default value for Reset calls -
parent
parent link specifically placed after default value so that variadic macro can initialise it -
firstChild
links within the property tree -
lastChild
links within the property tree -
nextSibling
links within the property tree -
nameHash
public int nameHash()hash for efficient sending of properties to the viewer -
uniqueID
public int uniqueID()unique, persistent ID among all properties -
initialised
Sets the specified value to theinitialised()field. -
type
Sets the specified value to thetype()field. -
flags
Sets the specified value to theflagsfield. -
value
Copies the specifiedRMTPropertyValueto thevalue()field. -
value
-
lastFrameValue
Copies the specifiedRMTPropertyValueto thelastFrameValue()field. -
lastFrameValue
Passes thelastFrameValue()field to the specifiedConsumer. -
prevValue
Copies the specifiedRMTPropertyValueto theprevValue()field. -
prevValue
Passes theprevValue()field to the specifiedConsumer. -
prevValueFrame
Sets the specified value to theprevValueFramefield. -
name
Sets the address of the specified encoded string to thename()field. -
description
Sets the address of the specified encoded string to thedescriptionfield. -
defaultValue
Copies the specifiedRMTPropertyValueto thedefaultValue()field. -
defaultValue
Passes thedefaultValue()field to the specifiedConsumer. -
parent
Sets the address of the specifiedRMTPropertyto theparent()field. -
firstChild
Sets the address of the specifiedRMTPropertyto thefirstChild()field. -
lastChild
Sets the address of the specifiedRMTPropertyto thelastChild()field. -
nextSibling
Sets the address of the specifiedRMTPropertyto thenextSibling()field. -
nameHash
Sets the specified value to thenameHash()field. -
uniqueID
Sets the specified value to theuniqueID()field. -
set
public RMTProperty set(boolean initialised, int type, int flags, RMTPropertyValue value, RMTPropertyValue lastFrameValue, RMTPropertyValue prevValue, int prevValueFrame, ByteBuffer name, ByteBuffer description, RMTPropertyValue defaultValue, @Nullable RMTProperty parent, @Nullable RMTProperty firstChild, @Nullable RMTProperty lastChild, @Nullable RMTProperty nextSibling, int nameHash, int uniqueID) 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 newRMTPropertyinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newRMTPropertyinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newRMTPropertyinstance allocated withBufferUtils. -
create
Returns a newRMTPropertyinstance for the specified memory address. -
createSafe
-
malloc
Returns a newRMTProperty.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newRMTProperty.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newRMTProperty.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aRMTProperty.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newRMTPropertyinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newRMTPropertyinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newRMTProperty.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newRMTProperty.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ninitialised
public static int ninitialised(long struct) Unsafe version ofinitialised(). -
ntype
public static int ntype(long struct) Unsafe version oftype(). -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
nvalue
Unsafe version ofvalue(). -
nlastFrameValue
Unsafe version oflastFrameValue(). -
nprevValue
Unsafe version ofprevValue(). -
nprevValueFrame
public static int nprevValueFrame(long struct) Unsafe version ofprevValueFrame(). -
nname
Unsafe version ofname(). -
nnameString
Unsafe version ofnameString(). -
ndescription
Unsafe version ofdescription(). -
ndescriptionString
Unsafe version ofdescriptionString(). -
ndefaultValue
Unsafe version ofdefaultValue(). -
nparent
Unsafe version ofparent(). -
nfirstChild
Unsafe version offirstChild(). -
nlastChild
Unsafe version oflastChild(). -
nnextSibling
Unsafe version ofnextSibling(). -
nnameHash
public static int nnameHash(long struct) Unsafe version ofnameHash(). -
nuniqueID
public static int nuniqueID(long struct) Unsafe version ofuniqueID(). -
ninitialised
public static void ninitialised(long struct, int value) Unsafe version ofinitialised. -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags. -
nvalue
Unsafe version ofvalue. -
nlastFrameValue
Unsafe version oflastFrameValue. -
nprevValue
Unsafe version ofprevValue. -
nprevValueFrame
public static void nprevValueFrame(long struct, int value) Unsafe version ofprevValueFrame. -
nname
Unsafe version ofname. -
ndescription
Unsafe version ofdescription. -
ndefaultValue
Unsafe version ofdefaultValue. -
nparent
Unsafe version ofparent. -
nfirstChild
Unsafe version offirstChild. -
nlastChild
Unsafe version oflastChild. -
nnextSibling
Unsafe version ofnextSibling. -
nnameHash
public static void nnameHash(long struct, int value) Unsafe version ofnameHash. -
nuniqueID
public static void nuniqueID(long struct, int value) Unsafe version ofuniqueID. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-