RaylibStruct<D extends RaylibStruct<D>> class abstract

Backend-agnostic base for Raylib struct mirror objects that are backed by native memory, adding op ownership tracking on top.

Implementers

Constructors

RaylibStruct({StructPointer<D>? op})

Properties

$state → RaylibTempStructState
Per-instance allocation state tracking slot keys, disposal, and identity.
final
hashCode → int
The hash code for this object.
no setteroverride
op ↔ StructPointer<D>?
The C-owned or RaylibTemp-owned typed 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 setter

Methods

clone() → D
Returns a deep copy of this instance, preserving op if present.
copy() → D
Returns a deep copy of this instance without op.
getOp() → StructPointer<D>
Returns op, throwing a descriptive StateError if unavailable or this instance RaylibTempStructState.isDisposed.
getOpAndDispose() → StructPointer<D>
Returns op and immediately disposes this struct.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDart(D o) → D
Copies the fields of o into this instance.
signature() → String
Returns a human-readable representation of this struct.
structAllocateInto(RaylibTemp<RaylibBase> temp, MemoryPointer<RType> p, String key) → void
Allocates nested pointers into temp under key as needed.
structMarkDisposed() → void
Marks this instance as disposed and clears op.
structOnOp(void callback(StructPointer<D> p)) → void
Calls callback with op if it is set, otherwise no-ops.
structReadFrom(MemoryPointer<RType> p) → void
structSetTag(String newTag) → D
Sets RaylibTempStructState.tag to newTag.
structSyncFromMemory() → void
Syncs all fields from the memory. Requires op.
structSyncToMemory() → void
Syncs all fields to the memory. Requires op.
structWriteInto(MemoryPointer<RType> p) → void
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override