StructValueField<E, R extends RType> class

A field whose value is stored inline in the struct, read and written via an ElementCodec.

Inheritance
Available extensions

Constructors

StructValueField(int offset, ElementCodec<E, R> codec)
const

Properties

codec → ElementCodec<E, R>
Codec used to convert between E and its native representation R.
final
hashCode → int
The hash code for this object.
no setterinherited
offset → int
Byte offset of this field from the start of the struct.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

allocate(RaylibTemp<RaylibBase> temp, MemoryPointer<RType> p, String key, {int count = 1, bool raw = false}) → void
Allocates any backing storage this field needs (e.g. string or array data that the field points to), using temp and identified by key.
override
live(MemoryPointer<RType>? ptrOf(), List<E>? initial) → StructLiveList<E, R>

Available on StructValueField<List<E>, RArray<R>>, provided by the LiveArrayFieldX extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(MemoryPointer<RType> p) → E
Reads this field's value from the struct at p.
override
readOr(MemoryPointer<RType>? p, E fallback) → E
Like read, but returns fallback if p is null.
inherited
toString() → String
A string representation of this object.
inherited
write(MemoryPointer<RType> p, E value) → E
Writes value into this field of the struct at p.
override
writeOr(MemoryPointer<RType>? p, E value) → E
Like write, but does nothing if p is null.
inherited

Operators

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