![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/lifecycleregistry.hpp"
Registry of callback functions accessible by a label (ID) provided at registration.
Registered functions will be added to a list, which can be triggered via label. Used by AppState to implement the lumiera lifecycle (init, shutdown) hooks.
Definition at line 56 of file lifecycleregistry.hpp.
Public Types | |
| typedef void(* | Hook) (void) |
| typedef std::set< Hook > | Callbacks |
| typedef Callbacks::iterator | Iter |
Static Public Member Functions | |
| static LifecycleRegistry & | instance () |
| get the (single) LifecycleRegistry instance. | |
Public Member Functions | |
| bool | enrol (Symbol label, Hook toCall) |
| void | execute (Symbol label) |
Private Member Functions | |
| LifecycleRegistry () | |
| ~LifecycleRegistry () | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
Private Attributes | |
| std::map< Symbol, Callbacks > | table_ |
|
inlineprivate |
Definition at line 91 of file lifecycleregistry.hpp.
References LifecycleRegistry::execute(), and lumiera::ON_BASIC_INIT.
Here is the call graph for this function:
|
inlineprivate |
Definition at line 95 of file lifecycleregistry.hpp.
| typedef void(* Hook) (void) |
Definition at line 60 of file lifecycleregistry.hpp.
Definition at line 61 of file lifecycleregistry.hpp.
| typedef Callbacks::iterator Iter |
Definition at line 62 of file lifecycleregistry.hpp.
Definition at line 66 of file lifecycleregistry.hpp.
References LifecycleRegistry::table_.
Referenced by LifecycleHook::add().
Here is the caller graph for this function:
|
inline |
Definition at line 73 of file lifecycleregistry.hpp.
References LifecycleRegistry::table_.
Referenced by LifecycleRegistry::LifecycleRegistry(), lumiera_Lifecycle_trigger(), and LifecycleHook::trigger().
Here is the caller graph for this function:
|
static |
get the (single) LifecycleRegistry instance.
#include "lib/depend.hpp", on static initialisation the handle planted within that include would invoke DependencyFactory<LifecycleRegistry>, which is defined later in the same header and thus not yet initialised. Definition at line 41 of file lifecycle.cpp.
Referenced by LifecycleHook::add(), lumiera_Lifecycle_trigger(), and LifecycleHook::trigger().
Here is the caller graph for this function:Definition at line 89 of file lifecycleregistry.hpp.
Referenced by LifecycleRegistry::enrol(), and LifecycleRegistry::execute().
Inheritance diagram for LifecycleRegistry:
Collaboration diagram for LifecycleRegistry: