RTempLitPtrAlloc<X, T extends NativeType> class
A slot-based allocator for arrays of pointers to literal elements.
Manages Pointer<Pointer<T>> slots; each inner pointer is produced by
rawArrayFunc from a List<X>.
- Inheritance
-
- Object
- RTempAlloc<
Pointer< T> > - RTempLitPtrAlloc
Constructors
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
- 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 flat
List<X>into an allocatedPointer<T>array.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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 via rawArrayFunc 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 and storing the result. -
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 value 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