SystemManager class
System manager for coordinating engine subsystems
This class acts as a registry for all engine subsystems, allowing them to be accessed by name or type. It also manages their lifecycle.
Example usage:
final systemManager = SystemManager();
systemManager.registerSystem('physics', physicsEngine);
final physics = systemManager.getSystem<PhysicsEngine>();
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Check if initialized
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- systemCount → int
-
Get the number of registered systems
no setter
Methods
-
clear(
) → void - Clear all registered systems
-
dispose(
) → void -
Dispose all systems and cleanup
override
-
getSystem<
T> () → T? - Get a system by type
-
getSystemByName(
String name) → dynamic - Get a system by name
-
getSystemNames(
) → List< String> - Get all registered system names
-
getSystems(
) → List - Get all registered systems
-
hasSystem(
String name) → bool - Check if a system is registered by name
-
hasSystemOfType<
T> () → bool - Check if a system type is registered
-
initialize(
) → Future< bool> -
Initialize the system manager
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printSystemInfo(
) → void - Print information about all registered systems
-
registerSystem<
T> (String name, T system) → void - Register a system with the manager
-
toString(
) → String -
A string representation of this object.
inherited
-
unregisterSystem(
String name) → bool - Unregister a system by name
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited