51 typedef LifecycleRegistry::Hook Callback;
54 LifecycleHook::LifecycleHook (
Symbol eventLabel, Callback callbackFun)
56 add (eventLabel,callbackFun);
101 lumiera_LifecycleHook_add (
const char* eventLabel,
void callbackFun(
void))
108 lumiera_Lifecycle_trigger (
const char* eventLabel)
const char * ON_BASIC_INIT
automatic static init. treated specially to run as soon as possible
static LifecycleRegistry & instance()
get the (single) LifecycleRegistry instance.
Installing and invoking of application lifecycle event callbacks.
Registry of callback functions accessible by a label (ID) provided at registration.
const char * ON_GLOBAL_SHUTDOWN
to be triggered at the end of main()
static void add(Symbol eventLabel, Hook callbackFun)
alternative, static interface for registering a callback
static void trigger(Symbol eventLabel)
trigger lifecycle callbacks registered under the given label
Token or Atom with distinct identity.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
bool enrol(Symbol label, Hook toCall)
const char * ON_GLOBAL_INIT
to be triggered in main()
define and register a callback for a specific lifecycle event.
Lumiera error handling (C++ interface).
Lumiera public interface.
Helper for registering lifecycle event callbacks, which are provided as a global service by lumiera::...
const char * ON_EMERGENCY
activated on shutdown after premature failure of a subsystem