WasmStructPtrAlloc<T extends StructDWeb<T> > class
- Inheritance
-
- Object
- RaylibTempAllocatorBase<
RaylibTemp, WasmStructPointerPointer< T> , int> - WasmAlloc<
WasmStructPointer< T> , WasmStructPointerPointer<T> > - WasmStructPtrAlloc
- Mixed-in types
Constructors
-
WasmStructPtrAlloc(RaylibTemp temp, String name, {required WasmStructPointer<
T> valueFunc([T?, String?]), required WasmStructPointer<T> rawArrayFunc(List<T> array), required WasmStructPointerPointer<T> pointerFactory(int ptr)})
Properties
- allocatorFunc → int Function([int count])
-
Allocates
countelements and returns the raw source pointer.finalinherited - byteSize → int
-
Size in bytes of a single element this allocator manages.
finalinherited
- freeFunc → void Function(int ptr)
-
Frees the memory at
ptr.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
indexSetterFunc
↔ void Function(WasmStructPointerPointer<
T> ptr, int i, WasmStructPointer<T> value) -
Overwrites the
i-th element of the array atptrwithvalue.latefinaloverride-getter -
isPointerNull
→ bool Function(WasmStructPointerPointer<
T> ptr) -
Returns
trueifptris null or zero.finalinherited - name → String
-
Debug name for this allocator, used in logging and diagnostics.
finalinherited
-
nullptrFactory
→ WasmStructPointerPointer<
T> Function() -
Returns a null/zero pointer of type
P.finalinherited -
pointerFactory
→ WasmStructPointerPointer<
T> Function(int ptr) -
Wraps a source pointer
ptrinto the platform pointer typeP.finalinherited -
pointerToSource
→ int Function(WasmStructPointerPointer<
T> ptr) -
Unwraps a platform pointer
ptrback to its source typeS.finalinherited -
printerFunc
→ String Function(WasmStructPointerPointer<
T> ptr) -
Returns a human-readable string representation of
ptr.finalinherited -
rawArrayFunc
→ WasmStructPointer<
T> Function(List<T> array) -
Converts a
List<D>of Dart struct wrappers into an allocatedParray.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slots
→ Map<
String, (WasmStructPointerPointer< T> , int)> -
Active allocation slots, keyed by slot name.
Each entry holds the pointer and its element count.
finalinherited
- temp → RaylibTemp
-
finalinherited
-
valueFunc
→ WasmStructPointer<
T> Function([T?, String?]) -
Converts an
Dof Dart struct wrapper into an allocatedPpointer.final
Methods
-
Array(
List< T> array, {String? key}) → WasmStructPointerPointer<T> -
Writes
arrayinto a tracked slot of sufficient capacity.inherited -
At(
String key, [int count = 1]) → WasmStructPointerPointer< T> -
Returns the
Pstored inkey, allocating (or reallocating) if necessary.inherited -
AtUnique(
String key, [int count = 1]) → WasmStructPointerPointer< T> -
Allocates (or reuses) a slot identified by a unique
keysuffix.inherited -
dispose(
) → void -
Frees all currently tracked slots and clears the slot table.
inherited
-
Fill(
List< List< arrays, {String? key}) → WasmStructPointerPointer<T> >T> -
Writes each sub-array in
arraysinto a tracked slot and returns the outerPPinherited -
FillRaw(
int count, WasmStructPointer< T> init(int), {String? key}) → WasmStructPointerPointer<T> -
Fills a tracked slot of
countpointers by callinginit(i)for each index.inherited -
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]) → WasmStructPointerPointer< T> -
Allocates
countraw elements and returns the wrapped pointer.inherited -
RawArray(
List< T> array) → WasmStructPointerPointer<T> -
Allocates an unslotted array.
inherited
-
RawArrayPopulated(
List< List< arrays) → WasmStructPointerPointer<T> >T> -
Allocates an unslotted pointer-of-pointers from a list of struct
arrays.inherited -
signature(
) → String -
Returns a string that identifies the concrete type of this allocator,
including its type parameters.
inherited
-
Size(
[int count = 1]) → int -
Returns the total byte size for
countelements.inherited -
Slot(
String key) → WasmStructPointerPointer< T> ? -
Returns the pointer stored under
key, ornullif the slot does not exist. Does not allocate.inherited -
slotKey(
[String? key]) → String -
Returns the canonical slot key for
key, falling back to'struct'whenkeyisnull.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
uniqueSlotKey(
String key) → String -
Returns a slot key guaranteed to be unique within this temp context,
by prefixing
keywith the next available ID.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