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
Mixin applications

Properties

allocatorFunc → S Function([int count])
Allocates count elements 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 C struct at index i of the array at ptr.
no setter
indexSetterFunc → void Function(P ptr, int i, V value)
Overwrites the i-th element of the array at ptr with value.
no setter
isPointerNull bool Function(P ptr)
Returns true if ptr is 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 ptr into the platform pointer type P.
finalinherited
pointerToSource → S Function(P ptr)
Unwraps a platform pointer ptr back to its source type S.
finalinherited
pointerToStruct → X Function(P ptr)
Converts a P to its Dart-side X wrapper, 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 V struct value referenced by ptr.
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 value into the i-th element of the array at ptr.
no setter
setRefFunc → P Function(P ptr, V value)
Assigns value to the struct referenced by ptr.
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 source into the native memory at ptr.
no setter
writeIntoFunc → void Function(P ptr, X value)
Writes the Dart value value into the struct at ptr.
no setter
writeIntoIndexedFunc → void Function(P ptr, int i, X value)
Writes the Dart value value into the i-th element of the array at ptr.
no setter

Methods

Array(List<X> array, {String? key}) → P
Writes array into a tracked slot of sufficient capacity.
At(String key, [int count = 1]) → P
Returns the P stored in key, allocating (or reallocating) if necessary.
inherited
AtUnique(String key, [int count = 1]) → P
Allocates (or reuses) a slot identified by a unique key suffix.
inherited
Copy(P src, int length, {String? key}) → P
Copies length structs from src into 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 to fn, then returns the struct fn wrote into it.
Extract2(void fn(S ptr)) → X
Allocates slot '2' as an uninitialized sret destination, passes its raw pointer to fn, then returns the struct fn wrote into it.
Extract3(void fn(S ptr)) → X
Allocates slot '3' as an uninitialized sret destination, passes its raw pointer to fn, then returns the struct fn wrote into it.
Extract4(void fn(S ptr)) → X
Allocates slot '4' as an uninitialized sret destination, passes its raw pointer to fn, then returns the struct fn wrote into it.
Extract5(void fn(S ptr)) → X
Allocates slot '5' as an uninitialized sret destination, passes its raw pointer to fn, then returns the struct fn wrote into it.
Extract6(void fn(S ptr)) → X
Allocates slot '6' as an uninitialized sret destination, passes its raw pointer to fn, then returns the struct fn wrote into it.
Extract7(void fn(S ptr)) → X
Allocates slot '7' as an uninitialized sret destination, passes its raw pointer to fn, then returns the struct fn wrote into it.
Extract8(void fn(S ptr)) → X
Allocates slot '8' as an uninitialized sret destination, passes its raw pointer to fn, then returns the struct fn wrote into it.
Fill(int count, X init(int), {String? key}) → P
Fills a tracked slot of count structs, producing each element via init(i) and writing it through writeIntoIndexedFunc.
FillInto(int count, void init(int, V), {String? key}) → P
Fills a tracked slot of count structs by calling init(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 count structs by setting each element to the C returned by init(ptr, i).
Free(String key) → void
Frees the native memory owned by slot key and removes it from the table.
inherited
getBaseKey(X value, [String? inner]) String
Builds a RaylibTempBase slot key from value's structName, tag, and an optional inner suffix.
getBaseKeyWithId(X value, [String? inner]) String
Like getBaseKey but prefixed with value's internalId, used for pointer-owning structs to prevent cross-instance key collisions.
Has(String key) bool
Returns true if a slot with the given key exists.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
PointerTo(X value, [String? key]) → P
Allocates or syncs value to a tracked slot at key.
Raw([int count = 1]) → P
Allocates count raw 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 count structs, populating each via init(i, struct) which writes directly into the native memory.
RawFillWith(int count, V init(P, int)) → P
Allocates an unslotted array of count structs, setting each element to the C returned by init(ptr, i).
Ref1([X? o]) → P
Allocates o into slot '1', or reuses the existing slot '1' allocation if o is null.
Ref1OrNull([X? o]) → P
Allocates o into slot '1', or returns nullptr if o is null.
Ref2([X? o]) → P
Allocates o into slot '2', or reuses the existing slot '2' allocation if o is null.
Ref2OrNull([X? o]) → P
Allocates o into slot '2', or returns nullptr if o is null.
Ref3([X? o]) → P
Allocates o into slot '3', or reuses the existing slot '3' allocation if o is null.
Ref3OrNull([X? o]) → P
Allocates o into slot '3', or returns nullptr if o is null.
Ref4([X? o]) → P
Allocates o into slot '4', or reuses the existing slot '4' allocation if o is null.
Ref4OrNull([X? o]) → P
Allocates o into slot '4', or returns nullptr if o is null.
Ref5([X? o]) → P
Allocates o into slot '5', or reuses the existing slot '5' allocation if o is null.
Ref5OrNull([X? o]) → P
Allocates o into slot '5', or returns nullptr if o is null.
Ref6([X? o]) → P
Allocates o into slot '6', or reuses the existing slot '6' allocation if o is null.
Ref6OrNull([X? o]) → P
Allocates o into slot '6', or returns nullptr if o is null.
Ref7([X? o]) → P
Allocates o into slot '7', or reuses the existing slot '7' allocation if o is null.
Ref7OrNull([X? o]) → P
Allocates o into slot '7', or returns nullptr if o is null.
Ref8([X? o]) → P
Allocates o into slot '8', or reuses the existing slot '8' allocation if o is null.
Ref8OrNull([X? o]) → P
Allocates o into slot '8', or returns nullptr if o is null.
RefCapture(String key, dynamic fn(S ptr)) → X
Copies the native struct o into a uniquely-keyed tracked slot and returns its Dart-side X wrapper via pointerToStruct.
RefUpdate1<R>(X? o, R fn(P p)) → R
Allocates o into slot '1', calls fn with the pointer, then syncs native memory back into o via updateFunc.
RefUpdate2<R>(X? o, R fn(P p)) → R
Allocates o into slot '2', calls fn with the pointer, then syncs native memory back into o via updateFunc.
RefUpdate3<R>(X? o, R fn(P p)) → R
Allocates o into slot '3', calls fn with the pointer, then syncs native memory back into o via updateFunc.
RefUpdate4<R>(X? o, R fn(P p)) → R
Allocates o into slot '4', calls fn with the pointer, then syncs native memory back into o via updateFunc.
RefUpdate5<R>(X? o, R fn(P p)) → R
Allocates o into slot '5', calls fn with the pointer, then syncs native memory back into o via updateFunc.
RefUpdate6<R>(X? o, R fn(P p)) → R
Allocates o into slot '6', calls fn with the pointer, then syncs native memory back into o via updateFunc.
RefUpdate7<R>(X? o, R fn(P p)) → R
Allocates o into slot '7', calls fn with the pointer, then syncs native memory back into o via updateFunc.
RefUpdate8<R>(X? o, R fn(P p)) → R
Allocates o into slot '8', calls fn with the pointer, then syncs native memory back into o via 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 count elements.
inherited
Slot(String key) → P?
Returns the pointer stored under key, or null if the slot does not exist. Does not allocate.
inherited
slotKey([String? key]) String
Returns the canonical slot key for key, falling back to 'struct' when key is null.
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 key with the next available ID.
inherited
Unslot(String key) → void
Removes the slot entry for key from the table without freeing the underlying memory.
inherited
Value([X? value, String? key]) → P
Returns the pointer for slot key, optionally writing value into it.

Operators

operator ==(Object other) bool
The equality operator.
inherited