55 ALERT (common,
"*** Unexpected error: %s\n Triggering emergency exit.", errorstate);
95#define _MAYBE_THROW_ \
96 maybeThrow<error::Fatal> ("internal failure while initialising the "\
97 "Lumiera application framework");
104 TRACE (common,
"initialising application core...");
121 TRACE (common,
"Lumiera core started successfully.");
129 TRACE (common,
"maybe startup %s...?",
cStr(subsys));
160 NOTICE (common,
"Shutting down Lumiera...");
164 ALERT (common,
"Triggering emergency exit...");
181 ERROR (common,
"Aborting Lumiera after unhandled error: %s",
cStr(problem.
what()));
183 log_and_clear_unexpected_errorstate();
205 log_and_clear_unexpected_errorstate();
232 TRACE (common,
"shutting down basic application layer...");
238 log_and_clear_unexpected_errorstate();
Registering and managing primary application-global services.
#define LUMIERA_LOCATION_OF_BOOTSTRAP_INI
"bootstrapIni" : the basic setup configuration to load
Access point to singletons and other kinds of dependencies designated by type.
~AppState()
anything which should be closed as late as possible and after the normal shutdown sequence can be pla...
string fetchSetupValue(lib::Literal key)
access basic application setup values (from setup.ini)
void init(lumiera::Option &options)
evaluate the result of option parsing and maybe additional configuration such as to be able to determ...
ExitCode abort() noexcept
initiate an fatal emergency shutdown, caused by an unforeseen error condition
ExitCode maybeWait()
put the main thread of the application into a wait state, as long as some subsystem(s) registered wit...
static lib::Depend< AppState > instance
get the (single) AppState instance.
void maybeStart(lumiera::Subsys &)
building on the state determined by init, decide if the given Subsys needs to be pulled up and,...
AppState()
perform initialisation triggered on first access.
opt::variable_value const & get(lib::Literal key) const
Interface and Base definition for all Lumiera Exceptions.
virtual CStr what() const noexcept override
std::exception interface : yield a diagnostic message
static void trigger(Symbol eventLabel)
trigger lifecycle callbacks registered under the given label
Frontend for handling the Lumiera application commandline arguments.
Dependencies and lifecycle of a partially independent Subsystem of the Application.
Implementation helper for managing execution of a collection of subsystems, which may depend on one a...
void lumiera_config_interface_destroy(void)
void lumiera_config_interface_init(void)
External interface to the lumiera configuration system.
lumiera_err lumiera_error(void)
Get and clear current error state.
Lumiera error handling (C++ interface).
Lumiera interface macros and structures.
void lumiera_interfaceregistry_init(void)
Initialise the interface registry.
void lumiera_interfaceregistry_destroy(void)
Global registry for interfaces (extension points).
void log_and_clear_unexpected_errorstate()
Lumiera public interface.
CStr ON_GLOBAL_INIT
to be triggered in main()
CStr ON_GLOBAL_SHUTDOWN
to be triggered at the end of main()
CStr ON_EMERGENCY
activated on shutdown after premature failure of a subsystem
AppState::ExitCode ExitCode
LumieraPlugin lumiera_plugin_load(const char *plugin)
Tries to load a plugin Creates a new plugin structure and tries to load and initialise the plugin.
int lumiera_plugin_register(LumieraPlugin plugin)
Register a plugin and its interfaces.
int lumiera_plugin_discover(LumieraPlugin(*callback_load)(const char *plugin), int(*callback_register)(LumieraPlugin))
discover new plugins traverses the configured plugin paths and calls the callback_load function for a...
Lumiera plugins define 'interfaces' as shown in interface.h, the plugin system handles the loading of...
Manage execution of the independent Subsystems of the Lumiera application.
Marker types to indicate a literal string and a Symbol.
CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...