37 #ifndef LUMIERA_LIFECYCLE_H 38 #define LUMIERA_LIFECYCLE_H 80 typedef void (*Hook)(void);
85 static void add (
Symbol eventLabel, Hook callbackFun);
101 extern const char * lumiera_ON_BASIC_INIT;
102 extern const char * lumiera_ON_GLOBAL_INIT;
103 extern const char * lumiera_ON_GLOBAL_SHUTDOWN;
106 void lumiera_LifecycleHook_add (
const char* eventLabel,
void callbackFun(
void));
107 void lumiera_Lifecycle_trigger (
const char* eventLabel);
const char * ON_BASIC_INIT
automatic static init. treated specially to run as soon as possible
const char * ON_GLOBAL_SHUTDOWN
to be triggered at the end of main()
Any copy and copy construction prohibited.
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.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Marker types to indicate a literal string and a Symbol.
const char * ON_GLOBAL_INIT
to be triggered in main()
define and register a callback for a specific lifecycle event.
Lumiera public interface.
const char * ON_EMERGENCY
activated on shutdown after premature failure of a subsystem