StructLayout<F extends StructFields> class
final
Describes the memory layout of a backend-agnostic struct.
Stores each field's RType, byte offset, floating-point slots, total byteSize, and required alignment.
Computes C-style natural alignment: each field is aligned according to its own alignment requirement, and the total struct size is rounded up to the largest field alignment.
Properties
- alignment → int
-
The alignment requirement of the struct in bytes.
final
- byteSize → int
-
The total size of the struct in bytes, including trailing alignment.
final
-
fields
→ Map<
F, RType> -
Maps each field to the RType describing its memory representation.
final
-
floatFields
→ List<
StructLayoutFloatSlot> -
Float fields whose values require IEEE-754 canonicalization.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
offsets
→ Map<
F, int> -
Maps each field to its byte offset from the beginning of the struct.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
enumValue<
X extends RaylibEnum, R extends RType> (F f, X enumFactory(int)) → StructValueField< X, R> -
Creates an enum value field for
f. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offset(
F field) → int -
Returns the byte offset of
fieldwithin the struct. -
pointerAny<
R extends RType> (F f) → StructPointerValueField< dynamic, R> -
Create a pointer-to-any-value field for
f. -
pointerEnumValue<
X extends RaylibEnum, R extends RType> (F f, X enumFactory(int)) → StructPointerValueField< X, R> -
Creates a pointer-to-enum field for
f. -
pointerPointerScalarArray<
T, R extends RType> (F f) → StructPointerArrayField< T, RPointer< R> > -
Creates a pointer-to-pointer scalar array field for
f. -
pointerPointerStructArray<
T extends RaylibStruct< (T> >F f) → StructPointerArrayField< T, RPointer< RStruct> > -
Creates a pointer-to-pointer struct array field for
f. -
pointerScalar<
T, R extends RType> (F f) → StructPointerValueField< T, R> -
Creates a pointer-to-scalar field for
f. -
pointerScalarArray<
T, R extends RType> (F f) → StructPointerArrayField< T, R> -
Creates a variable-length scalar pointer array field for
f. -
pointerScalarFixedArray<
T, R extends RType> (F f) → StructPointerValueField< List< T> , RArray<R> > -
Creates a pointer to a fixed-size scalar array field for
f. -
pointerStruct<
T extends RaylibStruct< (T> >F f) → StructPointerValueField< T, RStruct> -
Creates a pointer-to-struct field for
f. -
pointerStructArray<
T extends RaylibStruct< (T> >F f) → StructPointerArrayField< T, RStruct> -
Creates a variable-length struct pointer array field for
f. -
pointerStructFixedArray<
T extends RaylibStruct< (T> >F f) → StructPointerValueField< List< T> , RArray<RStruct> > -
Creates a pointer to a fixed-size struct array field for
f. -
pointerSync<
X, R extends RType> (F f) → StructPointerValueField< T, R> -
Creates a synchronized pointer field for
f. -
pointerUnknown<
R extends RTypeUnknownLike> (F f) → StructPointerValueField< dynamic, R> -
Creates a pointer-to-unknown-value field for
f. -
scalar<
E, R extends RType> (F f) → StructValueField< E, R> -
Creates a scalar value field for
f. -
scalarArray<
T, R extends RType> (F f) → StructValueField< List< T> , RArray<R> > -
Creates a fixed-size scalar array field for
f. -
stringAsCharArray<
R extends RTypeIntLike> (F f) → StructStringValueField< R> -
Creates a fixed-size character array field for
f. -
stringAsPointerChar<
R extends RTypeIntLike> (F f) → StructPointerValueField< String, R> -
Creates a pointer-to-character string field for
f. -
struct<
T extends RaylibStruct< (T> >F f) → StructValueField< T, RStruct> -
Creates a nested struct value field for
f. -
structArray<
T extends RaylibStruct< (T> >F f) → StructValueField< List< T> , RArray<RStruct> > -
Creates a fixed-size nested struct array field for
f. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
aligned<
F extends StructFields> (Map< F, RType> fields) → StructLayout<F> -
Creates a naturally aligned struct layout from
fields.