Lagrange
|
Container for System
s.
More...
#include <lagrange/ui/types/Systems.h>
Public Types | |
enum class | Stage : int { Init = 0 , Interface , Simulation , Render , Post , _SIZE } |
Public Member Functions | |
void | run (Stage stage, Registry ®istry) |
Runs a stage. More... | |
StringID | add (Stage stage, const System &system, StringID id=0) |
Adds a system which will be executed at a given stage. More... | |
bool | enable (StringID id, bool value) |
Enables or disables given system. More... | |
bool | succeeds (StringID system_id, StringID after_id) |
Places system with system_id after the system with after_id Note: Does not handle cycles nor topological ordering, only moves system_id in execution order. More... | |
bool | remove (StringID id) |
Removes system identifier with id More... | |
Container for System
s.
void run | ( | Stage | stage, |
Registry & | registry | ||
) |
Runs a stage.
Executes each system in this stage in order.
stage | Which stage |
registry | Registry to pass to system execution |
StringID add | ( | Stage | stage, |
const System & | system, | ||
StringID | id = 0 |
||
) |
Adds a system which will be executed at a given stage.
stage | Which Stage should the system be executed in |
system | System function to execute |
id | Optional identifier. Generated otherwise. |
id
wasn't given, this function will return a generated StringID
If id
was given, it will return the id
, or 0
if the system with id already exists bool enable | ( | StringID | id, |
bool | value | ||
) |
Enables or disables given system.
id | id of the system, previously return by add() |
value | enable or disable |
bool succeeds | ( | StringID | system_id, |
StringID | after_id | ||
) |
Places system with system_id
after the system with after_id
Note: Does not handle cycles nor topological ordering, only moves system_id
in execution order.
system | StringID |
after | StringID |
system_id
or after_id
do not exist bool remove | ( | StringID | id | ) |
Removes system identifier with id
id |