RaylibStructView<D extends RaylibStruct<D> > class
abstract
A RaylibStruct that is a live, read-only window over someone else's native memory rather than an owner of its own data.
Unlike a regular RaylibStruct, a view never copies field values into Dart-side storage and never writes through: structAllocateInto, structWriteInto and structReadFrom are no-ops, and setDart throws, since there is no independent Dart-side state to sync, every field read reflects op at the moment of access.
clone returns the same view instance because a view has no independent state to clone. copy delegates to clone and therefore also preserves the backing pointer.
A RaylibStructView represents data that is only observed through a pointer it does not own; use RaylibStructView when the struct should remain tied to that external memory.
- Inheritance
-
- Object
- RaylibStruct<
D> - RaylibStructView
- Implementers
Constructors
-
RaylibStructView({StructPointer<
D> ? op})
Properties
- $state → RaylibTempStructState
-
Per-instance allocation state tracking slot keys, disposal, and identity.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
op
↔ StructPointer<
D> ? -
The C-owned or RaylibTemp-owned typed pointer for this struct, if any.
getter/setter pairinherited-getteroverride-setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- structIsDisposed → bool
-
Whether structMarkDisposed has been called on this instance.
no setterinherited
- structName → String
-
The Dart-side type name of this struct
no setterinherited
Methods
-
clone(
) → D -
Returns a deep copy of this instance, preserving op if present.
override
-
copy(
) → D -
Returns a deep copy of this instance without op.
override
-
getOp(
) → StructPointer< D> -
Returns op, throwing a descriptive StateError if unavailable or this instance RaylibTempStructState.isDisposed.
inherited
-
getOpAndDispose(
) → StructPointer< D> -
Returns op and immediately disposes this struct.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setDart(
D o) → D -
Copies the fields of
ointo this instance.override -
signature(
) → String -
Returns a human-readable representation of this struct.
override
-
structAllocateInto(
RaylibTemp< RaylibBase> temp, MemoryPointer<RType> p, String key) → void -
Allocates nested pointers into
tempunderkeyas needed.override -
structMarkDisposed(
) → void -
Marks this instance as disposed and clears op.
inherited
-
structOnOp(
void callback(StructPointer< D> p)) → void -
Calls
callbackwith op if it is set, otherwise no-ops.inherited -
structReadFrom(
MemoryPointer< RType> p) → void -
override
-
structSetTag(
String newTag) → D -
Sets RaylibTempStructState.tag to
newTag.inherited -
structSyncFromMemory(
) → void -
Syncs all fields from the memory. Requires op.
inherited
-
structSyncToMemory(
) → void -
Syncs all fields to the memory. Requires op.
inherited
-
structWriteInto(
MemoryPointer< RType> p) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited