lumiera::LifecycleHook Class Reference
define and register a callback for some lifecycle event.
More...
#include <appconfig.hpp>
List of all members.
|
Public Member Functions |
|
LifecycleHook & | add (Symbol eventLabel, LifecycleRegistry::Hook callbackFun) |
| | for chained calls (add multiple callbacks)
|
|
| LifecycleHook (Symbol eventLabel, LifecycleRegistry::Hook callbackFun) |
Detailed Description
The purpose of this class is to be defined as a static variable in the implementation of some subsystem (i.e. in the cpp file), providing the ctor with the pointer to a callback function. Thus the callback gets enrolled when the corresponding object file is loaded. The event ON_BASIC_INIT is handled specifically, firing off the referred callback function as soon as possible. All other lables are just arbitrary (string) constants and it is necessary that "someone" cares to fire off the lifcycle events at the right place. For example, lumiera-main (and the test runner) calls
Appconfig::instance().execute(ON_GLOBAL_INIT) (and..SHUTDOWN)
- Note:
- duplicate or repeated calls with the same callback are a NOP
Definition at line 135 of file appconfig.hpp.
The documentation for this class was generated from the following file: