NativeLitFloatAlloc<C extends NativeType, L extends TypedDataList> class
A typed-list allocator for floating-point native types (e.g. Float, Double).
- Inheritance
-
- Object
- RaylibTempAllocatorBase<
RaylibTemp, Pointer< C> , Pointer<C> > - NativeAlloc<
C> - NativeLitAlloc<
num, C> - NativeLitTypedListAlloc<
num, C, L> - NativeLitFloatAlloc
- Mixed-in types
-
- RaylibTempLiteralFloatAllocatorBase<
RaylibTemp, L, Pointer< C> , Pointer<C> >
- RaylibTempLiteralFloatAllocatorBase<
Constructors
-
NativeLitFloatAlloc(RaylibTemp temp, String name, {required int byteSize, required Pointer<
C> allocatorFunc([int count]), required String printerFunc(Pointer<C> ptr), required void literalSetterFunc(Pointer<C> ptr, num value), required void indexSetterFunc(Pointer<C> ptr, int i, num value), required L fromList(Iterable<num> list), required L asView(Pointer<C> ptr, int length), required L fromBuffer(ByteBuffer buffer, int offsetInBytes, int length)})
Properties
-
allocatorFunc
→ Pointer<
C> Function([int count]) -
Allocates
countelements and returns the raw source pointer.finalinherited -
asDartList
↔ List<
num> Function(Pointer<C> ptr, int length) -
Returns a Dart
List<X>view overlengthelements starting atptr, backed directly by the underlying memory, no copy is made.latefinalinherited -
asView
→ L Function(Pointer<
C> ptr, int length) -
Wraps
ptras a Dart TypedDataList oflengthelements.finalinherited - byteSize → int
-
Size in bytes of a single element this allocator manages.
finalinherited
-
freeFunc
→ void Function(Pointer<
C> ptr) -
Frees the memory at
ptr.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(Pointer<
C> ptr, int i, num value) -
Writes
valueinto thei-th element of the array atptr.getter/setter pairinherited -
isPointerNull
→ bool Function(Pointer<
C> ptr) -
Returns
trueifptris null or zero.finalinherited -
literalSetterFunc
↔ void Function(Pointer<
C> ptr, num value) -
Writes a single Dart value
valueinto the memory pointed to byptr.getter/setter pairinherited - name → String
-
Debug name for this allocator, used in logging and diagnostics.
finalinherited
-
nullptrFactory
→ Pointer<
C> Function() -
Returns a null/zero pointer of type
P.finalinherited -
pointerFactory
→ Pointer<
C> Function(Pointer<C> ptr) -
Wraps a source pointer
ptrinto the platform pointer typeP.finalinherited -
pointerToSource
→ Pointer<
C> Function(Pointer<C> ptr) -
Unwraps a platform pointer
ptrback to its source typeS.finalinherited -
printerFunc
→ String Function(Pointer<
C> ptr) -
Returns a human-readable string representation of
ptr.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slots
→ Map<
String, (Pointer< C> , int)> -
Active allocation slots, keyed by slot name.
Each entry holds the pointer and its element count.
finalinherited
- temp → RaylibTemp
-
finalinherited
Methods
-
Array(
List< num> array, {String? key}) → Pointer<C> -
Writes
arrayinto a slot of sufficient capacity and returns the pointer.inherited -
At(
String key, [int count = 1]) → Pointer< C> -
Returns the
Pstored inkey, allocating (or reallocating) if necessary.inherited -
AtUnique(
String key, [int count = 1]) → Pointer< C> -
Allocates (or reuses) a slot identified by a unique
keysuffix.inherited -
Copy(
Pointer< C> src, int length, {String? key}) → Pointer<C> -
Copies
lengthelements fromsrcinto a slot and returns the pointer.inherited -
dispose(
) → void -
Frees all currently tracked slots and clears the slot table.
inherited
-
Fill(
int count, num init(int), {String? key}) → Pointer< C> -
Allocates (or reuses) a slot of
countelements, populating each indexiwith the value returned byinit(i).inherited -
Free(
String key) → void -
Frees the native memory owned by slot
keyand removes it from the table.inherited -
FromTypedData(
TypedData data, {String? key}) → Pointer< C> -
Copies
datainto a slot by reinterpreting its bytes as elements of typeX.inherited -
FromTypedList(
L list, {String? key}) → Pointer< C> -
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]) → Pointer< C> -
Allocates
countraw elements and returns the wrapped pointer.inherited -
RawArray(
List< num> array) → Pointer<C> -
Allocates an unslotted array.
inherited
-
RawArrayPopulated(
List< num> array) → Pointer<C> -
Allocates an unslotted array and populates it from
array.inherited -
Ref1(
[num? o]) → Pointer< C> -
Writes
ointo slot'1'and returns its pointer.inherited -
Ref2(
[num? o]) → Pointer< C> -
Writes
ointo slot'2'and returns its pointer.inherited -
Ref3(
[num? o]) → Pointer< C> -
Writes
ointo slot'3'and returns its pointer.inherited -
Ref4(
[num? o]) → Pointer< C> -
Writes
ointo slot'4'and returns its pointer.inherited -
RefOrNull1(
num? o) → Pointer< C> -
Writes
ointo slot'1'and returns its pointer, or returnsnullptrifoisnull.inherited -
RefOrNull2(
num? o) → Pointer< C> -
Writes
ointo slot'2'and returns its pointer, or returnsnullptrifoisnull.inherited -
RefOrNull3(
num? o) → Pointer< C> -
Writes
ointo slot'3'and returns its pointer, or returnsnullptrifoisnull.inherited -
RefOrNull4(
num? o) → Pointer< C> -
Writes
ointo slot'4'and returns its pointer, or returnsnullptrifoisnull.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 -
Sized(
int length, {String? key}) → Pointer< C> -
Allocates (or reuses) a slot of
lengthelements and returns its pointer, without writing any data into it.inherited -
Slot(
String key) → Pointer< C> ? -
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(
[num? value, String? key]) → Pointer< C> -
Returns the pointer for the slot identified by
key(default:'struct'), writingvalueinto it when provided.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited