FsceneComponentRegistry class

A registry of ComponentCodecs, keyed by component type name.

Realization looks a codec up by ComponentSpec.type (accepting schema former type names); serialization dispatches by the component's runtime type, falling back to a ComponentCodec.claims scan for codecs that do not declare one. Unknown components are skipped (with the caller deciding how to report it) rather than failing the load. The registry applies the universalComponentProperties (enabled) around every codec.

Constructors

FsceneComponentRegistry()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemas Iterable<ComponentSchema>
The registered component schemas, in registration order.
no setter
types Iterable<String>
The registered component type names, in registration order.
no setter

Methods

codecFor(String type) ComponentCodec?
The codec for type, accepting schemas' former type names.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
realize(ComponentSpec spec, RealizeContext context) Component?
Realizes spec into a live component, or returns null when no codec is registered for its type.
register(ComponentCodec codec) → void
Registers codec, replacing any existing codec for its type.
serialize(Component component, SerializeContext context) ComponentSpec?
Serializes component, dispatching by its runtime type and falling back to the first codec that claims it. Returns null when none does.
toString() String
A string representation of this object.
inherited
unregister(String type) ComponentCodec?
Removes the codec registered for type, returning it (null when absent). Documents carrying the type afterwards realize it as a lossless foreign placeholder, the same as any unknown type.

Operators

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