Lumiera  0.pre.03
»edit your freedom«
GuiSubsysDescriptor Class Reference

Description

Definition at line 100 of file guifacade.cpp.

Private Member Functions

bool checkRunningState () noexcept override
 whether this subsystem is actually operational. More...
 
void closeGuiModule ()
 
 operator string () const
 a human readable name
 
bool shouldStart (lumiera::Option &opts) override
 query application option state to determine if this subsystem should be activated. More...
 
bool start (lumiera::Option &, Subsys::SigTerm termNotification) override
 attempt to bring up this subsystem up. More...
 
void triggerShutdown () noexcept override
 

Additional Inherited Members

- Public Types inherited from Subsys
typedef function< void(string *)> SigTerm
 
- Public Member Functions inherited from Subsys
Subsysdepends (Subsys &prereq)
 define a dependency to another Subsys required for running this subsystem
 
const std::vector< Subsys * > getPrerequisites ()
 
bool isRunning () noexcept
 
- Static Public Member Functions inherited from Sync< CONF >
static MonitorgetMonitor (Sync const *forThis)
 

Member Function Documentation

◆ shouldStart()

bool shouldStart ( lumiera::Option )
inlineoverrideprivatevirtual

query application option state to determine if this subsystem should be activated.

Note
even if not started explicitly, it could still be started as prerequisite of another one

Implements Subsys.

Definition at line 107 of file guifacade.cpp.

References Option::getPort(), and Option::isHeadless().

+ Here is the call graph for this function:

◆ start()

bool start ( lumiera::Option options,
Subsys::SigTerm   
)
inlineoverrideprivatevirtual

attempt to bring up this subsystem up.

On return, the subsystem must be operational, according to checkRunningState(). Failure to start up usually terminates the whole application. When this subsystem ceases to work, it must ensure to activate the given callback signal.

Parameters
optionsmay be influencing the operation mode
SigTermto be signalled by the subsystem.
Warning
termination must be signalled reliably.
Returns
true if actually started.

Implements Subsys.

Definition at line 119 of file guifacade.cpp.

◆ triggerShutdown()

void triggerShutdown ( )
inlineoverrideprivatevirtualnoexcept
Warning
there is a possible race here, when shutdown is triggered before the GUI was able to open the GuiNotification interface. However, the Lumiera thread handling wrapper/framework ensures that a new thread actually starts to execute (and picks up the arguments), prior to returning from the thread starting function. For this reason, it is rather unlikely this race actually happens in practice, since opening the GuiNotification interface is done early, while starting the UI-Bus.

Implements Subsys.

Definition at line 145 of file guifacade.cpp.

References ERROR_LOG_AND_IGNORE, and GuiNotification::facade.

◆ checkRunningState()

bool checkRunningState ( )
inlineoverrideprivatevirtualnoexcept

whether this subsystem is actually operational.

When returning false here, the application may terminate at any point without further notice Note further, that a subsystem must not be in running state when signalling termination.

Implements Subsys.

Definition at line 153 of file guifacade.cpp.

References ERROR_LOG_AND_IGNORE, and lumiera_error_peek().

+ Here is the call graph for this function:
+ Inheritance diagram for GuiSubsysDescriptor:
+ Collaboration diagram for GuiSubsysDescriptor:

The documentation for this class was generated from the following file: