StructFieldBase<E> class abstract

Base for a typed field within a native struct, located at offset bytes from the struct's base pointer.

Subclasses define how a value of type E is read from and written to memory, and whether the field needs backing storage allocated.

Constructors

StructFieldBase(int offset)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
offset → int
Byte offset of this field from the start of the struct.
final
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.
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.
readOr(MemoryPointer<RType>? p, E fallback) → E
Like read, but returns fallback if p is null.
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.
writeOr(MemoryPointer<RType>? p, E value) → E
Like write, but does nothing if p is null.

Operators

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