LoopRegistry class abstract base

The loop's phases and the systems in them.

Order

Phases and systems are ordered by named after and before constraints, sorted when the loop next reaches a step boundary. A cycle is an error naming every member of it. Where constraints leave a choice, registration order decides — the application's own registrations first, then each plugin's in install order — and never a hash map.

A sort takes the earliest place the constraints allow for whatever was registered first, so a phase given only after: ['physics'] lands after every engine phase that follows physics too: the engine's chain was registered before it. To put a phase between two, name both.

A constraint naming a system that is not registered is ignored: "before fire" from a plugin that works with or without the fire plugin.

Inheritance
Implementers

Constructors

LoopRegistry()
For the engine's loop, which extends this; a plugin is handed one through its host.
const

Properties

companions → Iterable<PluginRegistry>
The registries that come with this one, found by PluginHost.registry as if each had been handed to the host itself.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAssimilation(String name, Assimilation assimilation, {List<String> after = const <String>[], List<String> before = const <String>[]}) → Registration
Adds assimilation to the step under name, unique in the loop: it runs in the LoopPhase.input phase of every step, after the step's input is in place, and is handed the ExternalStateInputs fed in for that step. Ordered against the phase's systems by after/before.
addPhase(LoopPhase phase, {List<String> after = const <String>[], List<String> before = const <String>[]}) → Registration
Adds a phase of its own kind, ordered against the others by after/before, which name phases of the same kind.
addSystem(String name, LoopPhase phase, LoopSystem system, {SystemSettings settings = const SystemSettings()}) → Registration
Adds system to phase under name, unique in the loop, ordered against the phase's other systems by settings' after/before.
forPlugin(PluginScope scope) → LoopRegistry
This registry as scope's plugin sees it: everything registered through the result is tracked by scope, ranked by it, and checked against its manifest. Must return the same type the registry is looked up by.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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