Class ecs_unit_desc_t

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

public class ecs_unit_desc_t extends Object
struct ecs_unit_desc_t {
    ecs_entity_t entity;
    const char *symbol;
    ecs_entity_t quantity;
    ecs_entity_t base;
    ecs_entity_t over;
    ecs_unit_translation_t translation;
    ecs_entity_t prefix;
}
  • 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
      
    • symbol$layout

      public static final AddressLayout symbol$layout()
      Layout for field:
      const char *symbol
      
    • symbol$offset

      public static final long symbol$offset()
      Offset for field:
      const char *symbol
      
    • symbol

      public static MemorySegment symbol(MemorySegment struct)
      Getter for field:
      const char *symbol
      
    • symbol

      public static void symbol(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      const char *symbol
      
    • quantity$layout

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

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

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

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

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

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

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

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

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

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

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

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

      public static final GroupLayout translation$layout()
      Layout for field:
      ecs_unit_translation_t translation
      
    • translation$offset

      public static final long translation$offset()
      Offset for field:
      ecs_unit_translation_t translation
      
    • translation

      public static MemorySegment translation(MemorySegment struct)
      Getter for field:
      ecs_unit_translation_t translation
      
    • translation

      public static void translation(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      ecs_unit_translation_t translation
      
    • prefix$layout

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

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

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

      public static void prefix(MemorySegment struct, long fieldValue)
      Setter for field:
      ecs_entity_t prefix
      
    • 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()