RaylibTempScalarIntAllocator<L extends TypedDataList, R extends RType> class
final
Specializes RaylibTempScalarTypedListAllocator for integer element types, adding integer-specific allocation helpers on top of the typed list interop.
- Inheritance
-
- Object
- RaylibTempAllocator<
R> - RaylibTempArrayAllocator<
num, R> - RaylibTempScalarAllocator<
num, R> - RaylibTempScalarTypedListAllocator<
num, L, R> - RaylibTempScalarIntAllocator
Constructors
-
RaylibTempScalarIntAllocator(RaylibTemp<
RaylibBase> temp, {required int byteSize, required void indexSetterFunc(MemoryPointer<R> ptr, int i, num value), required L fromList(Iterable<num> list), required L asView(MemoryPointer<RType> ptr, int length), required L fromBuffer(ByteBuffer buffer, int offsetInBytes, int length)})
Properties
-
$
→ RaylibTempScalarPointerAllocator<
num, R> -
latefinalinherited
-
$1Ptr
→ MemoryPointer<
R> -
Reusable single-element scratch slot, mutable (unlike $zeroPtr).
no setterinherited
-
$2Ptr
→ MemoryPointer<
R> -
Reusable single-element scratch slot, mutable (unlike $zeroPtr).
no setterinherited
-
$3Ptr
→ MemoryPointer<
R> -
Reusable single-element scratch slot, mutable (unlike $zeroPtr).
no setterinherited
-
$4Ptr
→ MemoryPointer<
R> -
Reusable single-element scratch slot, mutable (unlike $zeroPtr).
no setterinherited
-
$newPtr
→ MemoryPointer<
R> -
Fresh, independently-owned scratch pointer, unlike $zeroPtr..$4Ptr.
no setterinherited
-
$zeroPtr
→ MemoryPointer<
R> -
Fixed scratch slot holding a zero-initialized value.
no setterinherited
-
asView
→ L Function(MemoryPointer<
RType> ptr, int length) -
Wraps
ptras a Dart TypedDataList oflengthelements.finalinherited - byteSize → int
-
Size in bytes of a single element this allocator manages.
finalinherited
- fromBuffer → L Function(ByteBuffer buffer, int offsetInBytes, int length)
-
Wraps a region of
bufferas a DartLlist without copying.finalinherited -
fromList
→ L Function(Iterable<
num> list) -
Constructs a typed list
Lfrom an iterable ofXvalues.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
indexSetterFunc
→ void Function(MemoryPointer<
R> ptr, int i, num value) -
Writes
valueinto thei-th element of the array atptr.finalinherited - name ↔ String
-
Debug name for this allocator, used in logging and diagnostics.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slots
→ Map<
String, (MemoryPointer< R> , int)> -
Active allocation slots, keyed by slot name.
Each entry holds the pointer and its element count.
finalinherited
-
temp
→ RaylibTemp<
RaylibBase> -
finalinherited
Methods
-
Array(
List< num> array, {String? key}) → MemoryPointer<R> -
Writes
arrayinto a slot of sufficient capacity and returns the pointer.inherited -
asDartList(
MemoryPointer< RType> ptr, int length) → List<num> -
Returns a Dart
List<X>withlengthelements copied fromptr.inherited -
asTypedList(
MemoryPointer< RType> ptr, int length) → L -
Returns a
Lwithlengthelements copied fromptr.inherited -
At(
String key, [int count = 1]) → MemoryPointer< R> -
Returns the pointer stored in
key, allocating (or reallocating) if necessary.inherited -
AtUnique(
{String key = '@unique:', int count = 1}) → MemoryPointer< R> -
Allocates (or reuses) a slot identified by a unique
keysuffix.inherited -
Copy(
MemoryPointer< RType> src, int length, {String? key}) → MemoryPointer<R> -
Copies
lengthelements fromsrcinto a slot and returns the pointer.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 -
FromTypedData(
TypedData data, {String? key}) → MemoryPointer< R> -
Copies
datainto a slot by reinterpreting its bytes as elements of typeX.inherited -
FromTypedList(
L list, {String? key}) → MemoryPointer< R> -
Copies
lengthelements from a typed listlistinto a slot.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< R> -
Allocates
countraw elements and returns the wrapped pointer.inherited -
RawArray(
List< num> array) → MemoryPointer<R> -
Allocates an unslotted array and populates it from
array.inherited -
Ref1(
[num? o]) → MemoryPointer< R> -
Writes
ointo slot@slot:1and returns its pointer.inherited -
Ref2(
[num? o]) → MemoryPointer< R> -
Writes
ointo slot@slot:2and returns its pointer.inherited -
Ref3(
[num? o]) → MemoryPointer< R> -
Writes
ointo slot@slot:3and returns its pointer.inherited -
Ref4(
[num? o]) → MemoryPointer< R> -
Writes
ointo slot@slot:4and returns its pointer.inherited -
RefOrNull1(
num? o) → MemoryPointer< R> -
Writes
ointo slot@slot:1and returns its pointer, or returnsnullptrifoisnull.inherited -
RefOrNull2(
num? o) → MemoryPointer< R> -
Writes
ointo slot@slot:2and returns its pointer, or returnsnullptrifoisnull.inherited -
RefOrNull3(
num? o) → MemoryPointer< R> -
Writes
ointo slot@slot:3and returns its pointer, or returnsnullptrifoisnull.inherited -
RefOrNull4(
num? o) → MemoryPointer< R> -
Writes
ointo slot@slot:4and returns its pointer, or returnsnullptrifoisnull.inherited -
Size(
[int count = 1]) → int -
Returns the total byte size for
countelements.inherited -
Sized(
int length, {String? key}) → MemoryPointer< R> -
Allocates (or reuses) a slot of
lengthelements and returns its pointer, without writing any data into it.inherited -
Slot(
String key) → MemoryPointer< R> ? -
Returns the pointer stored under
key, ornullif the slot does not exist. Does not allocate.inherited -
ToBEBytes(
MemoryPointer< RType> ptr, int length) → L -
Serialises
lengthwords starting atptrto a flat big-endian byte list. -
ToLEBytes(
MemoryPointer< RType> ptr, int length) → L -
Serialises
lengthwords starting atptrto a flat little-endian byte list. -
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 -
Value(
[num? value, String? key]) → MemoryPointer< R> -
Returns the pointer for the slot identified by
key(default:default), writingvalueinto it when provided.inherited -
ValueUnique(
num? value, {String key = '@valueUnique:'}) → MemoryPointer< R> -
Returns the pointer for the slot identified by a unique
keysuffix writingvalueinto it when provided.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited