Class ecs_ref_t

java.lang.Object
com.github.elebras1.flecs.ecs_ref_t

public class ecs_ref_t extends Object
struct ecs_ref_t {
    ecs_entity_t entity;
    ecs_entity_t id;
    uint64_t table_id;
    uint32_t table_version_fast;
    uint16_t table_version;
    ecs_record_t *record;
    void *ptr;
}
  • Method Details

    • layout

      public static final GroupLayout layout()
      The layout of this struct
    • entity$layout

      public static final ValueLayout.OfLong entity$layout()
      Layout for field:
      ecs_entity_t entity
      
    • entity$offset

      public static final long entity$offset()
      Offset for field:
      ecs_entity_t entity
      
    • entity

      public static long entity(MemorySegment struct)
      Getter for field:
      ecs_entity_t entity
      
    • entity

      public static void entity(MemorySegment struct, long fieldValue)
      Setter for field:
      ecs_entity_t entity
      
    • id$layout

      public static final ValueLayout.OfLong id$layout()
      Layout for field:
      ecs_entity_t id
      
    • id$offset

      public static final long id$offset()
      Offset for field:
      ecs_entity_t id
      
    • id

      public static long id(MemorySegment struct)
      Getter for field:
      ecs_entity_t id
      
    • id

      public static void id(MemorySegment struct, long fieldValue)
      Setter for field:
      ecs_entity_t id
      
    • table_id$layout

      public static final ValueLayout.OfLong table_id$layout()
      Layout for field:
      uint64_t table_id
      
    • table_id$offset

      public static final long table_id$offset()
      Offset for field:
      uint64_t table_id
      
    • table_id

      public static long table_id(MemorySegment struct)
      Getter for field:
      uint64_t table_id
      
    • table_id

      public static void table_id(MemorySegment struct, long fieldValue)
      Setter for field:
      uint64_t table_id
      
    • table_version_fast$layout

      public static final ValueLayout.OfInt table_version_fast$layout()
      Layout for field:
      uint32_t table_version_fast
      
    • table_version_fast$offset

      public static final long table_version_fast$offset()
      Offset for field:
      uint32_t table_version_fast
      
    • table_version_fast

      public static int table_version_fast(MemorySegment struct)
      Getter for field:
      uint32_t table_version_fast
      
    • table_version_fast

      public static void table_version_fast(MemorySegment struct, int fieldValue)
      Setter for field:
      uint32_t table_version_fast
      
    • table_version$layout

      public static final ValueLayout.OfShort table_version$layout()
      Layout for field:
      uint16_t table_version
      
    • table_version$offset

      public static final long table_version$offset()
      Offset for field:
      uint16_t table_version
      
    • table_version

      public static short table_version(MemorySegment struct)
      Getter for field:
      uint16_t table_version
      
    • table_version

      public static void table_version(MemorySegment struct, short fieldValue)
      Setter for field:
      uint16_t table_version
      
    • record_$layout

      public static final AddressLayout record_$layout()
      Layout for field:
      ecs_record_t *record
      
    • record_$offset

      public static final long record_$offset()
      Offset for field:
      ecs_record_t *record
      
    • record_

      public static MemorySegment record_(MemorySegment struct)
      Getter for field:
      ecs_record_t *record
      
    • record_

      public static void record_(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      ecs_record_t *record
      
    • ptr$layout

      public static final AddressLayout ptr$layout()
      Layout for field:
      void *ptr
      
    • ptr$offset

      public static final long ptr$offset()
      Offset for field:
      void *ptr
      
    • ptr

      public static MemorySegment ptr(MemorySegment struct)
      Getter for field:
      void *ptr
      
    • ptr

      public static void ptr(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      void *ptr
      
    • asSlice

      public static MemorySegment asSlice(MemorySegment array, long index)
      Obtains a slice of arrayParam which selects the array element at index. The returned segment has address arrayParam.address() + index * layout().byteSize()
    • sizeof

      public static long sizeof()
      The size (in bytes) of this struct
    • allocate

      public static MemorySegment allocate(SegmentAllocator allocator)
      Allocate a segment of size layout().byteSize() using allocator
    • allocateArray

      public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of size elementCount using allocator. The returned segment has size elementCount * layout().byteSize().
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size layout().byteSize()
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size elementCount * layout().byteSize()