RaylibTempStructAllocatorBase<TempType extends RaylibTempBase<RaylibBase> , X extends RaylibStructBase<TempType, P, X> , V, P, S> mixin
Extends RaylibTempAllocatorBase with struct allocation, providing
PointerTo, _Ref, _RefOrNull, _RefUpdate, and _Extract helpers for
Dart mirror objects (X) backed by native structs (V).
- Superclass constraints
- RaylibTempAllocatorBase<
TempType, P, S>
- RaylibTempAllocatorBase<
Properties
- allocatorFunc → S 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(S ptr)
-
Frees the memory at
ptr.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- indexerFunc → V Function(P ptr, int i)
-
Returns the
Cstruct at indexiof the array atptr.no setter - indexSetterFunc → void Function(P ptr, int i, V value)
-
Overwrites the
i-th element of the array atptrwithvalue.no setter - isPointerNull → bool Function(P ptr)
-
Returns
trueifptris null or zero.finalinherited - name → String
-
Debug name for this allocator, used in logging and diagnostics.
finalinherited
- nullptrFactory → P Function()
-
Returns a null/zero pointer of type
P.finalinherited - pointerFactory → P Function(S ptr)
-
Wraps a source pointer
ptrinto the platform pointer typeP.finalinherited - pointerToSource → S Function(P ptr)
-
Unwraps a platform pointer
ptrback to its source typeS.finalinherited - pointerToStruct → X Function(P ptr)
-
Converts a
Pto its Dart-sideXwrapper, referencing the memory at that pointer.no setter - printerFunc → String Function(P ptr)
-
Returns a human-readable string representation of
ptr.finalinherited - refFunc → V Function(P ptr)
-
Returns the
Vstruct value referenced byptr.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setCFunc → void Function(P ptr, int i, V value)
-
Copies the raw C struct
valueinto thei-th element of the array atptr.no setter - setRefFunc → P Function(P ptr, V value)
-
Assigns
valueto the struct referenced byptr.no setter -
slots
→ Map<
String, (P, int)> -
Active allocation slots, keyed by slot name.
Each entry holds the pointer and its element count.
finalinherited
- temp → TempType
-
finalinherited
- updateFunc → void Function(P ptr, X source)
-
Copies the fields of
sourceinto the native memory atptr.no setter - writeIntoFunc → void Function(P ptr, X value)
-
Writes the Dart value
valueinto the struct atptr.no setter - writeIntoIndexedFunc → void Function(P ptr, int i, X value)
-
Writes the Dart value
valueinto thei-th element of the array atptr.no setter
Methods
-
Array(
List< X> array, {String? key}) → P -
Writes
arrayinto a tracked slot of sufficient capacity. -
At(
String key, [int count = 1]) → P -
Returns the
Pstored inkey, allocating (or reallocating) if necessary.inherited -
AtUnique(
String key, [int count = 1]) → P -
Allocates (or reuses) a slot identified by a unique
keysuffix.inherited -
Copy(
P src, int length, {String? key}) → P -
Copies
lengthstructs fromsrcinto a tracked slot using setCFunc. -
dispose(
) → void -
Frees all currently tracked slots and clears the slot table.
inherited
-
Extract1(
void fn(S ptr)) → X -
Allocates slot
'1'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Extract2(
void fn(S ptr)) → X -
Allocates slot
'2'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Extract3(
void fn(S ptr)) → X -
Allocates slot
'3'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Extract4(
void fn(S ptr)) → X -
Allocates slot
'4'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Extract5(
void fn(S ptr)) → X -
Allocates slot
'5'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Extract6(
void fn(S ptr)) → X -
Allocates slot
'6'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Extract7(
void fn(S ptr)) → X -
Allocates slot
'7'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Extract8(
void fn(S ptr)) → X -
Allocates slot
'8'as an uninitialized sret destination, passes its raw pointer tofn, then returns the structfnwrote into it. -
Fill(
int count, X init(int), {String? key}) → P -
Fills a tracked slot of
countstructs, producing each element viainit(i)and writing it through writeIntoIndexedFunc. -
FillInto(
int count, void init(int, V), {String? key}) → P -
Fills a tracked slot of
countstructs by callinginit(i, struct)which writes directly into the native struct fields. -
FillWith(
int count, V init(P, int), {String? key}) → P -
Fills a tracked slot of
countstructs by setting each element to theCreturned byinit(ptr, i). -
Free(
String key) → void -
Frees the native memory owned by slot
keyand removes it from the table.inherited -
getBaseKey(
X value, [String? inner]) → String -
Builds a RaylibTempBase slot key from
value'sstructName,tag, and an optionalinnersuffix. -
getBaseKeyWithId(
X value, [String? inner]) → String -
Like getBaseKey but prefixed with
value'sinternalId, used for pointer-owning structs to prevent cross-instance key collisions. -
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
-
PointerTo(
X value, [String? key]) → P -
Allocates or syncs
valueto a tracked slot atkey. -
Raw(
[int count = 1]) → P -
Allocates
countraw elements and returns the wrapped pointer.inherited -
RawArray(
List< X> array) → P - Allocates an unslotted array.
-
RawArrayPopulated(
List< X> array) → P -
Allocates an unslotted array and populates it from
array. -
RawFillInto(
int count, void init(int, V)) → P -
Allocates an unslotted array of
countstructs, populating each viainit(i, struct)which writes directly into the native memory. -
RawFillWith(
int count, V init(P, int)) → P -
Allocates an unslotted array of
countstructs, setting each element to theCreturned byinit(ptr, i). -
Ref1(
[X? o]) → P -
Allocates
ointo slot'1', or reuses the existing slot'1'allocation ifoisnull. -
Ref1OrNull(
[X? o]) → P -
Allocates
ointo slot'1', or returnsnullptrifoisnull. -
Ref2(
[X? o]) → P -
Allocates
ointo slot'2', or reuses the existing slot'2'allocation ifoisnull. -
Ref2OrNull(
[X? o]) → P -
Allocates
ointo slot'2', or returnsnullptrifoisnull. -
Ref3(
[X? o]) → P -
Allocates
ointo slot'3', or reuses the existing slot'3'allocation ifoisnull. -
Ref3OrNull(
[X? o]) → P -
Allocates
ointo slot'3', or returnsnullptrifoisnull. -
Ref4(
[X? o]) → P -
Allocates
ointo slot'4', or reuses the existing slot'4'allocation ifoisnull. -
Ref4OrNull(
[X? o]) → P -
Allocates
ointo slot'4', or returnsnullptrifoisnull. -
Ref5(
[X? o]) → P -
Allocates
ointo slot'5', or reuses the existing slot'5'allocation ifoisnull. -
Ref5OrNull(
[X? o]) → P -
Allocates
ointo slot'5', or returnsnullptrifoisnull. -
Ref6(
[X? o]) → P -
Allocates
ointo slot'6', or reuses the existing slot'6'allocation ifoisnull. -
Ref6OrNull(
[X? o]) → P -
Allocates
ointo slot'6', or returnsnullptrifoisnull. -
Ref7(
[X? o]) → P -
Allocates
ointo slot'7', or reuses the existing slot'7'allocation ifoisnull. -
Ref7OrNull(
[X? o]) → P -
Allocates
ointo slot'7', or returnsnullptrifoisnull. -
Ref8(
[X? o]) → P -
Allocates
ointo slot'8', or reuses the existing slot'8'allocation ifoisnull. -
Ref8OrNull(
[X? o]) → P -
Allocates
ointo slot'8', or returnsnullptrifoisnull. -
RefCapture(
String key, dynamic fn(S ptr)) → X -
Copies the native struct
ointo a uniquely-keyed tracked slot and returns its Dart-sideXwrapper via pointerToStruct. -
RefUpdate1<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'1', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
RefUpdate2<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'2', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
RefUpdate3<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'3', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
RefUpdate4<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'4', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
RefUpdate5<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'5', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
RefUpdate6<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'6', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
RefUpdate7<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'7', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
RefUpdate8<
R> (X? o, R fn(P p)) → R -
Allocates
ointo slot'8', callsfnwith the pointer, then syncs native memory back intoovia updateFunc. -
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) → P? -
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 -
Value(
[X? value, String? key]) → P -
Returns the pointer for slot
key, optionally writingvalueinto it.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited