RaylibTempStringAllocatorBase<TempType extends RaylibTempBase<RaylibBase> , PP, P, S> mixin
Extends RaylibTempAllocatorBase with string allocation, handling
UTF-8 encoding and null-termination into temporary slots.
PP is the char-pointer-pointer type, P the char-pointer type.
- Superclass constraints
- RaylibTempAllocatorBase<
TempType, P, S>
- RaylibTempAllocatorBase<
- Mixin applications
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 - freePPFunc → void Function(PP ptr)
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- indexSetterFunc → void Function(PP ptrptr, int i, P ptr)
-
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 - printerFunc → String Function(P ptr)
-
Returns a human-readable string representation of
ptr.finalinherited - ptrAllocatorFunc → PP Function(int count)
-
no setter
- ptrByteSize → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slotCount → int
-
Number of anonymous (ring-buffer) string slots pre-reserved on construction.
no setter
-
slots
→ Map<
String, (P, int)> -
Active allocation slots, keyed by slot name.
Each entry holds the pointer and its element count.
finalinherited
- stringAnonIndex ↔ int
-
getter/setter pair
-
stringCapacities
↔ List<
int> -
getter/setter pair
-
stringSlots
↔ List<
P> -
getter/setter pair
-
stringSlotsKeyed
→ Map<
String, int> -
final
-
stringSlotsPtrsKeyed
→ Map<
String, (PP, int)> -
final
- temp → TempType
-
finalinherited
Methods
-
Array(
List< String> array, {String? key}) → PP -
Writes each string in
arrayinto keyed sub-slots and returns a trackedPPof lengtharray.length. -
At(
String key, [int count = 1]) → P -
Returns the
Pstored inkey, allocating (or reallocating) if necessary.inherited -
AtPtr(
String key, [int count = 1]) → PP -
AtUnique(
String key, [int count = 1]) → P -
Allocates (or reuses) a slot identified by a unique
keysuffix.inherited -
dispose(
) → void -
Frees all currently tracked slots and clears the slot table.
override
-
Fill(
int count, P init(int), {String? key}) → PP -
Fills a tracked
PPofcountelements by calling init for each index. -
Free(
String key) → void -
Frees the native memory owned by slot
keyand removes it from the table.override -
Has(
String key) → bool -
Returns
trueif a slot with the givenkeyexists.inherited -
Length(
String text, [int? bufferSize]) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
Raw(
[int count = 1]) → P -
Allocates
countraw elements and returns the wrapped pointer.inherited -
reallocSlotIfRequired(
int slot, int length) → void -
Ref1(
[String? o, int? bufferSize]) → P -
Writes
ointo slot'1'and returns its pointer. -
Ref2(
[String? o, int? bufferSize]) → P -
Writes
ointo slot'2'and returns its pointer. -
Ref3(
[String? o, int? bufferSize]) → P -
Writes
ointo slot'3'and returns its pointer. -
Ref4(
[String? o, int? bufferSize]) → P -
Writes
ointo slot'4'and returns its pointer. -
RefOrNull1(
String? o) → P -
Writes
ointo slot'1'and returns its pointer, or returns nullptr ifoisnull. -
RefOrNull2(
String? o) → P -
Writes
ointo slot'2'and returns its pointer, or returns nullptr ifoisnull. -
RefOrNull3(
String? o) → P -
Writes
ointo slot'3'and returns its pointer, or returns nullptr ifoisnull. -
RefOrNull4(
String? o) → P -
Writes
ointo slot'4'and returns its pointer, or returns nullptr ifoisnull. -
reset(
) → void - Resets all slot bookkeeping structures to their initial state.
-
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(
String text, [String? key]) → P -
Returns a
Pfortextusing the next anonymous ring-buffer slot. -
ValueAt(
String key, [String? text, int? bufferSize]) → P -
Returns the
Pfor the keyed slotkey, optionally writingtextinto it. -
ValueOrNull(
[String? text, String? key]) → P -
Writes
textinto slot usingValueand returns its pointer, or returns nullptr iftextisnull. -
writeToSlot(
int slot, String text, [int? bufferSize]) → P -
Writes
textinto slotslot, reallocating if the current capacity is insufficient for the UTF-8 encoded length.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited