RaylibTempStructPointerAllocator<X extends RaylibStruct<X> > class
final
Extends RaylibTempAllocator with pointer-to-struct allocation,
- Inheritance
-
- Object
- RaylibTempAllocator<
RPointer< RStruct> > - RaylibTempStructPointerAllocator
Constructors
-
RaylibTempStructPointerAllocator(RaylibTemp<
RaylibBase> temp, {required int byteSize, required StructPointer<X> arrayFunc(List<X> array, {String? key}), required StructPointer<X> rawArrayFunc(List<X> array)})
Properties
-
arrayFunc
→ StructPointer<
X> Function(List<X> array, {String? key}) -
Converts a
Xof Dart struct wrapper into an allocatedPpointer.final - byteSize → int
-
Size in bytes of a single element this allocator manages.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- name ↔ String
-
Debug name for this allocator, used in logging and diagnostics.
getter/setter pairinherited-setteroverride-getter
-
rawArrayFunc
→ StructPointer<
X> Function(List<X> array) -
Converts a List of Dart struct wrappers
Xinto an allocatedParray.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slots
→ Map<
String, (MemoryPointer< RPointer< , int)>RStruct> > -
Active allocation slots, keyed by slot name.
Each entry holds the pointer and its element count.
finalinherited
-
temp
→ RaylibTemp<
RaylibBase> -
finalinherited
Methods
-
Array(
List< List< array, {String? key}) → MemoryPointer<X> >RPointer< RStruct> > -
Writes
arrayinto a tracked slot of sufficient capacity. -
At(
String key, [int count = 1]) → MemoryPointer< RPointer< RStruct> > -
Returns the pointer stored in
key, allocating (or reallocating) if necessary.inherited -
AtUnique(
{String key = '@unique:', int count = 1}) → MemoryPointer< RPointer< RStruct> > -
Allocates (or reuses) a slot identified by a unique
keysuffix.inherited -
dispose(
) → void -
Frees all currently tracked slots and clears the slot table.
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]) → MemoryPointer< RPointer< RStruct> > -
Allocates
countraw elements and returns the wrapped pointer.inherited -
RawArray(
List< List< arrays) → MemoryPointer<X> >RPointer< RStruct> > -
Allocates an unslotted pointer-of-pointers from a list of struct
arrays. -
Size(
[int count = 1]) → int -
Returns the total byte size for
countelements.inherited -
Slot(
String key) → MemoryPointer< RPointer< ?RStruct> > -
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