Class RMTPropertyValue

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class RMTPropertyValue extends Struct<RMTPropertyValue> implements NativeResource

 union rmtPropertyValue {
     rmtBool Bool;
     rmtS32 S32;
     rmtU32 U32;
     rmtF32 F32;
     rmtS64 S64;
     rmtU64 U64;
     rmtF64 F64;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int BOOL
      The struct member offsets.
    • S32

      public static final int S32
      The struct member offsets.
    • U32

      public static final int U32
      The struct member offsets.
    • F32

      public static final int F32
      The struct member offsets.
    • S64

      public static final int S64
      The struct member offsets.
    • U64

      public static final int U64
      The struct member offsets.
    • F64

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

    • RMTPropertyValue

      public RMTPropertyValue(ByteBuffer container)
      Creates a RMTPropertyValue 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<RMTPropertyValue>
    • Bool

      public boolean Bool()
      Returns:
      the value of the Bool field.
    • S32

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

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

      public float F32()
      Returns:
      the value of the F32 field.
    • S64

      public long S64()
      Returns:
      the value of the S64 field.
    • U64

      public long U64()
      Returns:
      the value of the U64 field.
    • F64

      public double F64()
      Returns:
      the value of the F64 field.
    • Bool

      public RMTPropertyValue Bool(boolean value)
      Sets the specified value to the Bool field.
    • S32

      public RMTPropertyValue S32(int value)
      Sets the specified value to the S32 field.
    • U32

      public RMTPropertyValue U32(int value)
      Sets the specified value to the U32 field.
    • F32

      public RMTPropertyValue F32(float value)
      Sets the specified value to the F32 field.
    • S64

      public RMTPropertyValue S64(long value)
      Sets the specified value to the S64 field.
    • U64

      public RMTPropertyValue U64(long value)
      Sets the specified value to the U64 field.
    • F64

      public RMTPropertyValue F64(double value)
      Sets the specified value to the F64 field.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static RMTPropertyValue.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new RMTPropertyValue.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
    • nBool

      public static int nBool(long struct)
      Unsafe version of Bool().
    • nS32

      public static int nS32(long struct)
      Unsafe version of S32.
    • nU32

      public static int nU32(long struct)
      Unsafe version of U32.
    • nF32

      public static float nF32(long struct)
      Unsafe version of F32.
    • nS64

      public static long nS64(long struct)
      Unsafe version of S64.
    • nU64

      public static long nU64(long struct)
      Unsafe version of U64.
    • nF64

      public static double nF64(long struct)
      Unsafe version of F64.
    • nBool

      public static void nBool(long struct, int value)
      Unsafe version of Bool.
    • nS32

      public static void nS32(long struct, int value)
      Unsafe version of S32.
    • nU32

      public static void nU32(long struct, int value)
      Unsafe version of U32.
    • nF32

      public static void nF32(long struct, float value)
      Unsafe version of F32.
    • nS64

      public static void nS64(long struct, long value)
      Unsafe version of S64.
    • nU64

      public static void nU64(long struct, long value)
      Unsafe version of U64.
    • nF64

      public static void nF64(long struct, double value)
      Unsafe version of F64.