A top-level class for the process. More...
#include <run.h>
Public Member Functions | |
Run (Output &output, const G::Arg &arg, const std::string &switch_spec) | |
Constructor. Tries not to throw. More... | |
virtual | ~Run () |
Destructor. More... | |
bool | hidden () const |
Returns true if the program should run in hidden mode. More... | |
bool | prepare () |
Prepares to run() typically by parsing the commandline. More... | |
bool | prepareError () const |
Returns true if prepare() failed. More... | |
void | run () |
Runs the application. More... | |
const Configuration & | config () const |
Returns a configuration object. More... | |
G::Signal3< std::string, std::string, std::string > & | signal () |
Provides a signal which is activated when something changes. More... | |
virtual void | onException (std::exception &) |
Final override from GNet::EventHandler. More... | |
Static Public Member Functions | |
static std::string | versionNumber () |
Returns the application version number string. More... | |
A top-level class for the process.
Usage:
Main::Run::Run | ( | Main::Output & | output, |
const G::Arg & | arg, | ||
const std::string & | switch_spec | ||
) |
Constructor. Tries not to throw.
Definition at line 72 of file run.cpp.
References G::Signal2< P1, P2 >::connect(), GNet::ClientPtr< TClient >::doneSignal(), GNet::ClientPtr< TClient >::eventSignal(), and G::slot().
const Main::Configuration & Main::Run::config | ( | ) | const |
bool Main::Run::hidden | ( | ) | const |
|
virtual |
Final override from GNet::EventHandler.
Implements GNet::EventHandler.
Definition at line 510 of file run.cpp.
References G_ERROR.
bool Main::Run::prepare | ( | ) |
Prepares to run() typically by parsing the commandline.
Error messages are sent to the Output interface. Returns true if run() should be called.
Definition at line 150 of file run.cpp.
References Main::Configuration::debug(), Main::Configuration::log(), Main::Configuration::logFile(), Main::Configuration::logTimestamp(), G::LogOutput::Mail, Main::Configuration::useSyslog(), and Main::Configuration::verbose().
Referenced by main().
bool Main::Run::prepareError | ( | ) | const |
void Main::Run::run | ( | ) |
G::Signal3< std::string, std::string, std::string > & Main::Run::signal | ( | ) |
|
static |