RTempStructPtrAlloc<T extends Struct, X extends StructD<X, T> > class
A slot-based allocator for arrays of pointers to native structs of type T.
Manages Pointer<Pointer<T>> slots where each inner Pointer<T> is
produced from a List<X> via rawArrayFunc.
- Inheritance
-
- Object
- RTempAlloc<
Pointer< T> > - RTempStructPtrAlloc
Constructors
-
RTempStructPtrAlloc(RaylibTemp temp, String name, {required Pointer<
Pointer< allocatorFunc([int count]), required String printerFunc(Pointer<T> >Pointer< ptr), required Pointer<T> >T> valueFunc([X?, String?]), required Pointer<T> rawArrayFunc(List<X> array), required void indexSetterFunc(Pointer<Pointer< ptr, int i, Pointer<T> >T> value)})
Properties
-
allocatorFunc
↔ Pointer<
Pointer< Function([int count])T> > -
Low-level allocation function. Called with an element
countand returns a freshly allocatedPointer<T>.getter/setter pairinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
indexSetterFunc
↔ void Function(Pointer<
Pointer< ptr, int i, Pointer<T> >T> value) -
Overwrites the
i-th element of the array atptrwithvalue.getter/setter pair - name → String
-
Human-readable name for this allocator, used in debug/log messages.
finalinherited
-
printerFunc
↔ String Function(Pointer<
Pointer< ptr)T> > -
Debug printer: converts a
Pointer<T>to a human-readable string.getter/setter pairinherited -
rawArrayFunc
↔ Pointer<
T> Function(List<X> array) -
Converts a
List<X>of Dart struct wrappers into an allocatedPointer<T>array.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
valueFunc
↔ Pointer<
T> Function([X?, String?]) -
Converts an
Xof Dart struct wrapper into an allocatedPointer<T>pointer.getter/setter pair
Methods
-
Array(
List< X> array, {String? key}) → Pointer<Pointer< T> > -
Writes
arrayinto a tracked slot of sufficient capacity. -
At(
String key, [int count = 1]) → Pointer< Pointer< T> > -
Returns the
Pointer<T>stored inkey, allocating (or reallocating) if necessary.inherited -
Fill(
List< List< arrays, {String? key}) → Pointer<X> >Pointer< T> > -
Writes each sub-array in
arraysinto a tracked slot and returns the outerPointer<Pointer<T>>] -
FillRaw(
int count, Pointer< T> init(int), {String? key}) → Pointer<Pointer< T> > -
Fills a tracked slot of
countpointers by callinginit(i)for each index. -
Free(
String key) → void -
Frees the native memory owned by slot
keyand removes it from the table.inherited -
Has(
String key) → bool -
Returns
trueif a slot with the givenkeyexists.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
Raw(
[int count = 1]) → Pointer< Pointer< T> > -
Allocates an unslotted
Pointer<Pointer<T>>ofcountelements. -
RawArray(
List< List< arrays) → Pointer<X> >Pointer< T> > - Allocates an unslotted pointer-of-pointers from a list of struct arrays.
-
signature(
) → String -
Returns a string that identifies the concrete type of this allocator,
including its type parameters (e.g.
"RTempAlloc<Float>").override -
Slot(
String key) → Pointer< Pointer< ?T> > -
Returns the pointer stored under
key, ornullif the slot does not exist. Does not allocate.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
Unslot(
String key) → void -
Removes the slot entry for
keyfrom the table without freeing the underlying memory.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited