RaylibStructBase<T extends RaylibTempBase<RaylibBase> , P, D extends RaylibStructBase<T, P, D> > class
abstract
Backend-agnostic base for Raylib struct mirror objects that are backed by native memory, adding originalPointer ownership tracking on top of RaylibStructObjectBase.
- Mixed-in types
- Implementers
Constructors
- RaylibStructBase({P? originalPointer})
Properties
- $state → RaylibTempStructState
-
Per-instance allocation state tracking slot keys, disposal, and identity.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- originalPointer ↔ P?
-
The C-owned or RaylibTemp-owned native pointer for this struct, if any.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- structIsDisposed → bool
-
Whether structMarkDisposed has been called on this instance.
no setter
- structName → String
-
The Dart-side type name of this struct
no setterinherited
- structRequiresOriginalPointer → bool
-
Whether this struct requires an originalPointer to function correctly.
no setter
Methods
-
clone(
) → D -
Returns a deep copy of this instance, preserving RaylibStructBase.originalPointer if present.
inherited
-
copy(
) → D -
Returns a deep copy of this instance without originalPointer.
override
-
getOriginalPointer(
) → P - Returns originalPointer, throwing a descriptive StateError if unavailable or this instance RaylibTempStructState.isDisposed.
-
getOriginalPointerAndDispose(
) → P - Returns originalPointer and immediately calls structMarkDisposed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setD(
D o) → D -
Copies the fields of
ointo this instance and returnsthis.inherited -
signature(
) → String -
Returns a human-readable representation of this struct's current field values.
inherited
-
structAllocateInto(
T temp, P p, String key) → void -
Allocates nested pointers into
tempunderkeyas needed. -
structMarkDisposed(
) → void - Marks this instance as disposed and clears originalPointer.
-
structOnOp(
void callback(P p)) → void -
Calls
callbackwith originalPointer if it is set, otherwise no-ops. -
structReadFrom(
P p) → void -
Reads all fields from the memory at
p. -
structSetTag(
String newTag) → D -
Sets RaylibTempStructState.tag to
newTagand returnsthisfor chaining. -
structSyncFromMemory(
) → void - Syncs all fields from the memory. Requires originalPointer.
-
structSyncInto(
T temp, P p, String key) → void -
Syncs Dart-side fields into the already-allocated native pointer
p. Defaults to structWriteInto. -
structSyncToMemory(
) → void - Syncs all fields to the memory. Requires originalPointer.
-
structWriteInto(
P p) → void -
Writes all fields into the memory at
p. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited