Class RMTProperty

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class RMTProperty extends Struct<RMTProperty> implements NativeResource

 struct rmtProperty {
     rmtBool initialised;
     rmtPropertyType type;
     rmtPropertyFlags flags;
     {@link RMTPropertyValue rmtPropertyValue} value;
     {@link RMTPropertyValue rmtPropertyValue} lastFrameValue;
     {@link RMTPropertyValue rmtPropertyValue} prevValue;
     rmtU32 prevValueFrame;
     char const * name;
     char const * description;
     {@link RMTPropertyValue rmtPropertyValue} defaultValue;
     {@link RMTProperty rmtProperty} * parent;
     {@link RMTProperty rmtProperty} * firstChild;
     {@link RMTProperty rmtProperty} * lastChild;
     {@link RMTProperty rmtProperty} * nextSibling;
     rmtU32 nameHash;
     rmtU32 uniqueID;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • INITIALISED

      public static final int INITIALISED
      The struct member offsets.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • VALUE

      public static final int VALUE
      The struct member offsets.
    • LASTFRAMEVALUE

      public static final int LASTFRAMEVALUE
      The struct member offsets.
    • PREVVALUE

      public static final int PREVVALUE
      The struct member offsets.
    • PREVVALUEFRAME

      public static final int PREVVALUEFRAME
      The struct member offsets.
    • NAME

      public static final int NAME
      The struct member offsets.
    • DESCRIPTION

      public static final int DESCRIPTION
      The struct member offsets.
    • DEFAULTVALUE

      public static final int DEFAULTVALUE
      The struct member offsets.
    • PARENT

      public static final int PARENT
      The struct member offsets.
    • FIRSTCHILD

      public static final int FIRSTCHILD
      The struct member offsets.
    • LASTCHILD

      public static final int LASTCHILD
      The struct member offsets.
    • NEXTSIBLING

      public static final int NEXTSIBLING
      The struct member offsets.
    • NAMEHASH

      public static final int NAMEHASH
      The struct member offsets.
    • UNIQUEID

      public static final int UNIQUEID
      The struct member offsets.
  • Constructor Details

    • RMTProperty

      public RMTProperty(ByteBuffer container)
      Creates a RMTProperty instance at the current position of the specified ByteBuffer 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
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<RMTProperty>
    • initialised

      public boolean initialised()
      Returns:
      the value of the initialised field.
    • type

      public int type()
      Returns:
      the value of the type field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • value

      public RMTPropertyValue value()
      Returns:
      a RMTPropertyValue view of the value field.
    • lastFrameValue

      public RMTPropertyValue lastFrameValue()
      Returns:
      a RMTPropertyValue view of the lastFrameValue field.
    • prevValue

      public RMTPropertyValue prevValue()
      Returns:
      a RMTPropertyValue view of the prevValue field.
    • prevValueFrame

      public int prevValueFrame()
      Returns:
      the value of the prevValueFrame field.
    • name

      public ByteBuffer name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the name field.
    • nameString

      public String nameString()
      Returns:
      the null-terminated string pointed to by the name field.
    • description

      public ByteBuffer description()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the description field.
    • descriptionString

      public String descriptionString()
      Returns:
      the null-terminated string pointed to by the description field.
    • defaultValue

      public RMTPropertyValue defaultValue()
      Returns:
      a RMTPropertyValue view of the defaultValue field.
    • parent

      public @Nullable RMTProperty parent()
      Returns:
      a RMTProperty view of the struct pointed to by the parent field.
    • firstChild

      public @Nullable RMTProperty firstChild()
      Returns:
      a RMTProperty view of the struct pointed to by the firstChild field.
    • lastChild

      public @Nullable RMTProperty lastChild()
      Returns:
      a RMTProperty view of the struct pointed to by the lastChild field.
    • nextSibling

      public @Nullable RMTProperty nextSibling()
      Returns:
      a RMTProperty view of the struct pointed to by the nextSibling field.
    • nameHash

      public int nameHash()
      Returns:
      the value of the nameHash field.
    • uniqueID

      public int uniqueID()
      Returns:
      the value of the uniqueID field.
    • initialised

      public RMTProperty initialised(boolean value)
      Sets the specified value to the initialised field.
    • type

      public RMTProperty type(int value)
      Sets the specified value to the type field.
    • flags

      public RMTProperty flags(int value)
      Sets the specified value to the flags field.
    • value

      public RMTProperty value(RMTPropertyValue value)
      Copies the specified RMTPropertyValue to the value field.
    • value

      public RMTProperty value(Consumer<RMTPropertyValue> consumer)
      Passes the value field to the specified Consumer.
    • lastFrameValue

      public RMTProperty lastFrameValue(RMTPropertyValue value)
      Copies the specified RMTPropertyValue to the lastFrameValue field.
    • lastFrameValue

      public RMTProperty lastFrameValue(Consumer<RMTPropertyValue> consumer)
      Passes the lastFrameValue field to the specified Consumer.
    • prevValue

      public RMTProperty prevValue(RMTPropertyValue value)
      Copies the specified RMTPropertyValue to the prevValue field.
    • prevValue

      public RMTProperty prevValue(Consumer<RMTPropertyValue> consumer)
      Passes the prevValue field to the specified Consumer.
    • prevValueFrame

      public RMTProperty prevValueFrame(int value)
      Sets the specified value to the prevValueFrame field.
    • name

      public RMTProperty name(ByteBuffer value)
      Sets the address of the specified encoded string to the name field.
    • description

      public RMTProperty description(ByteBuffer value)
      Sets the address of the specified encoded string to the description field.
    • defaultValue

      public RMTProperty defaultValue(RMTPropertyValue value)
      Copies the specified RMTPropertyValue to the defaultValue field.
    • defaultValue

      public RMTProperty defaultValue(Consumer<RMTPropertyValue> consumer)
      Passes the defaultValue field to the specified Consumer.
    • parent

      public RMTProperty parent(@Nullable RMTProperty value)
      Sets the address of the specified RMTProperty to the parent field.
    • firstChild

      public RMTProperty firstChild(@Nullable RMTProperty value)
      Sets the address of the specified RMTProperty to the firstChild field.
    • lastChild

      public RMTProperty lastChild(@Nullable RMTProperty value)
      Sets the address of the specified RMTProperty to the lastChild field.
    • nextSibling

      public RMTProperty nextSibling(@Nullable RMTProperty value)
      Sets the address of the specified RMTProperty to the nextSibling field.
    • nameHash

      public RMTProperty nameHash(int value)
      Sets the specified value to the nameHash field.
    • uniqueID

      public RMTProperty uniqueID(int value)
      Sets the specified value to the uniqueID 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

      public RMTProperty set(RMTProperty src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static RMTProperty malloc()
      Returns a new RMTProperty instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static RMTProperty calloc()
      Returns a new RMTProperty instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static RMTProperty create()
      Returns a new RMTProperty instance allocated with BufferUtils.
    • create

      public static RMTProperty create(long address)
      Returns a new RMTProperty instance for the specified memory address.
    • createSafe

      public static @Nullable RMTProperty createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static RMTProperty.Buffer malloc(int capacity)
      Returns a new RMTProperty.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static RMTProperty.Buffer calloc(int capacity)
      Returns a new RMTProperty.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static RMTProperty.Buffer create(int capacity)
      Returns a new RMTProperty.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static RMTProperty.Buffer create(long address, int capacity)
      Create a RMTProperty.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable RMTProperty.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static RMTProperty malloc(MemoryStack stack)
      Returns a new RMTProperty instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static RMTProperty calloc(MemoryStack stack)
      Returns a new RMTProperty instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static RMTProperty.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new RMTProperty.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static RMTProperty.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new RMTProperty.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ninitialised

      public static int ninitialised(long struct)
      Unsafe version of initialised().
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nvalue

      public static RMTPropertyValue nvalue(long struct)
      Unsafe version of value().
    • nlastFrameValue

      public static RMTPropertyValue nlastFrameValue(long struct)
      Unsafe version of lastFrameValue().
    • nprevValue

      public static RMTPropertyValue nprevValue(long struct)
      Unsafe version of prevValue().
    • nprevValueFrame

      public static int nprevValueFrame(long struct)
      Unsafe version of prevValueFrame().
    • nname

      public static ByteBuffer nname(long struct)
      Unsafe version of name().
    • nnameString

      public static String nnameString(long struct)
      Unsafe version of nameString().
    • ndescription

      public static ByteBuffer ndescription(long struct)
      Unsafe version of description().
    • ndescriptionString

      public static String ndescriptionString(long struct)
      Unsafe version of descriptionString().
    • ndefaultValue

      public static RMTPropertyValue ndefaultValue(long struct)
      Unsafe version of defaultValue().
    • nparent

      public static @Nullable RMTProperty nparent(long struct)
      Unsafe version of parent().
    • nfirstChild

      public static @Nullable RMTProperty nfirstChild(long struct)
      Unsafe version of firstChild().
    • nlastChild

      public static @Nullable RMTProperty nlastChild(long struct)
      Unsafe version of lastChild().
    • nnextSibling

      public static @Nullable RMTProperty nnextSibling(long struct)
      Unsafe version of nextSibling().
    • nnameHash

      public static int nnameHash(long struct)
      Unsafe version of nameHash().
    • nuniqueID

      public static int nuniqueID(long struct)
      Unsafe version of uniqueID().
    • ninitialised

      public static void ninitialised(long struct, int value)
      Unsafe version of initialised.
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nvalue

      public static void nvalue(long struct, RMTPropertyValue value)
      Unsafe version of value.
    • nlastFrameValue

      public static void nlastFrameValue(long struct, RMTPropertyValue value)
      Unsafe version of lastFrameValue.
    • nprevValue

      public static void nprevValue(long struct, RMTPropertyValue value)
      Unsafe version of prevValue.
    • nprevValueFrame

      public static void nprevValueFrame(long struct, int value)
      Unsafe version of prevValueFrame.
    • nname

      public static void nname(long struct, ByteBuffer value)
      Unsafe version of name.
    • ndescription

      public static void ndescription(long struct, ByteBuffer value)
      Unsafe version of description.
    • ndefaultValue

      public static void ndefaultValue(long struct, RMTPropertyValue value)
      Unsafe version of defaultValue.
    • nparent

      public static void nparent(long struct, @Nullable RMTProperty value)
      Unsafe version of parent.
    • nfirstChild

      public static void nfirstChild(long struct, @Nullable RMTProperty value)
      Unsafe version of firstChild.
    • nlastChild

      public static void nlastChild(long struct, @Nullable RMTProperty value)
      Unsafe version of lastChild.
    • nnextSibling

      public static void nnextSibling(long struct, @Nullable RMTProperty value)
      Unsafe version of nextSibling.
    • nnameHash

      public static void nnameHash(long struct, int value)
      Unsafe version of nameHash.
    • nuniqueID

      public static void nuniqueID(long struct, int value)
      Unsafe version of uniqueID.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate