![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "common/subsys.hpp"
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Using such descriptors, AppState as activated from main() is able to pull up, maintain and shut down the primary parts of the Application.
Definition at line 61 of file subsys.hpp.
Public Types | |
| typedef function< void(string *)> | SigTerm |
Public Member Functions | |
| virtual | ~Subsys () |
| virtual | operator string () const =0 |
| a human readable name | |
| Subsys & | depends (Subsys &prereq) |
| define a dependency to another Subsys required for running this subsystem | |
| bool | isRunning () noexcept |
| virtual bool | shouldStart (lumiera::Option &)=0 |
| query application option state to determine if this subsystem should be activated. | |
| virtual bool | start (lumiera::Option &options, SigTerm)=0 |
| attempt to bring up this subsystem up. | |
| virtual void | triggerShutdown () noexcept=0 |
| initiate termination of this subsystem. | |
| const std::vector< Subsys * > | getPrerequisites () |
Private Member Functions | |
| virtual bool | checkRunningState () noexcept=0 |
| whether this subsystem is actually operational. | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
Private Attributes | |
| std::vector< Subsys * > | prereq_ |
|
virtual |
Definition at line 36 of file subsys.cpp.
| typedef function<void(string*)> SigTerm |
Definition at line 65 of file subsys.hpp.
|
pure virtual |
a human readable name
Implemented in GuiSubsysDescriptor, SessionSubsystem, PlayOutSubsysDescriptor, EngineSubsysDescriptor, NetNodeSubsysDescriptor, ScriptRunnerSubsysDescriptor, and MockSys.
define a dependency to another Subsys required for running this subsystem
Definition at line 41 of file subsys.cpp.
References Subsys::prereq_.
Referenced by main().
Here is the caller graph for this function:
|
noexcept |
Definition at line 50 of file subsys.cpp.
References Subsys::checkRunningState().
Referenced by SubsystemRunner::maybeRun(), SubsystemRunner::sigTerm(), and SubsystemRunner::triggerStartup().
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
query application option state to determine if this subsystem should be activated.
Implemented in EngineSubsysDescriptor, NetNodeSubsysDescriptor, ScriptRunnerSubsysDescriptor, MockSys, GuiSubsysDescriptor, SessionSubsystem, and PlayOutSubsysDescriptor.
Referenced by SubsystemRunner::maybeRun().
Here is the caller graph for this function:
|
pure virtual |
attempt to bring up this subsystem up.
On return, the subsystem must be operational, according to checkRunningState(). Failure to start up usually terminates the whole application. When this subsystem ceases to work, it must ensure to activate the given callback signal.
| options | may be influencing the operation mode |
| SigTerm | to be signalled by the subsystem. |
true if actually started. Implemented in NetNodeSubsysDescriptor, ScriptRunnerSubsysDescriptor, EngineSubsysDescriptor, MockSys, GuiSubsysDescriptor, PlayOutSubsysDescriptor, and SessionSubsystem.
Referenced by SubsystemRunner::triggerStartup().
Here is the caller graph for this function:
|
pure virtualnoexcept |
initiate termination of this subsystem.
This trigger may be called repeatedly any time... When the subsystem actually has terminated, the SigTerm passed to start must be invoked.
Implemented in GuiSubsysDescriptor, SessionSubsystem, PlayOutSubsysDescriptor, EngineSubsysDescriptor, NetNodeSubsysDescriptor, ScriptRunnerSubsysDescriptor, and MockSys.
Referenced by SubsystemRunner::shutdownAll(), and SubsystemRunner::triggerStartup().
Here is the caller graph for this function:
|
inline |
Definition at line 111 of file subsys.hpp.
References Subsys::prereq_.
Referenced by SubsystemRunner::triggerStartup().
Here is the caller graph for this function:
|
privatepure virtualnoexcept |
whether this subsystem is actually operational.
When returning false here, the application may terminate at any point without further notice Note further, that a subsystem must not be in running state when signalling termination.
Implemented in GuiSubsysDescriptor, SessionSubsystem, PlayOutSubsysDescriptor, EngineSubsysDescriptor, NetNodeSubsysDescriptor, ScriptRunnerSubsysDescriptor, and MockSys.
Referenced by Subsys::isRunning().
Here is the caller graph for this function:
|
private |
Definition at line 122 of file subsys.hpp.
Referenced by Subsys::depends(), and Subsys::getPrerequisites().
Inheritance diagram for Subsys:
Collaboration diagram for Subsys: