Main application.
More...
#include <App.hpp>
|
| App (const std::vector< std::string > &args) noexcept |
| Constructor. More...
|
|
virtual | ~App () |
| Destructor waiting for active threads before cleaning up the application. More...
|
|
|
static void | signal (int signalNumber) |
| Static signal handler. More...
|
|
Main application.
This class
- writes default output to
stdout
- checks the program arguments
- loads the configuration file
- runs the command-and-control server
- handles signals by the operating system
◆ App() [1/3]
crawlservpp::Main::App::App |
( |
const std::vector< std::string > & |
args | ) |
|
|
explicitnoexcept |
Constructor.
Writes the application header to stdout
, checks the program arguments, loads the configuration from the configuration file, gets the database password from the user (i.e. stdin), initializes and finally runs the command-and-control server.
- Parameters
-
args | Constant reference to a vector contining the program arguments passed to the application, e.g. via the command line. |
◆ ~App()
crawlservpp::Main::App::~App |
( |
| ) |
|
|
virtual |
◆ App() [2/3]
crawlservpp::Main::App::App |
( |
App & |
| ) |
|
|
delete |
Deleted copy constructor.
◆ App() [3/3]
crawlservpp::Main::App::App |
( |
App && |
| ) |
|
|
delete |
Deleted move constructor.
◆ operator=() [1/2]
App& crawlservpp::Main::App::operator= |
( |
App & |
| ) |
|
|
delete |
Deleted copy assignment operator.
◆ operator=() [2/2]
App& crawlservpp::Main::App::operator= |
( |
App && |
| ) |
|
|
delete |
Deleted move assignment operator.
◆ run()
int crawlservpp::Main::App::run |
( |
| ) |
|
|
noexcept |
Runs the application.
References crawlservpp::Struct::ServerSettings::allowedClients, crawlservpp::Main::argsRequired, crawlservpp::Struct::DatabaseSettings::compression, crawlservpp::Struct::ServerSettings::dataDeletable, crawlservpp::Struct::DatabaseSettings::debugLogging, crawlservpp::Struct::NetworkSettings::defaultProxy, crawlservpp::Main::descCopyrightHead, crawlservpp::Main::descCopyrightTail, crawlservpp::Main::descLicense, crawlservpp::Main::descName, crawlservpp::Main::descUsage, crawlservpp::Main::descUsing, crawlservpp::Main::descVer, crawlservpp::Main::doneMsg, crawlservpp::Helper::Portability::getch(), crawlservpp::Helper::Versions::getLibraryVersionsStr(), crawlservpp::Main::Version::getString(), crawlservpp::Main::ConfigFile::getValue(), crawlservpp::Struct::DatabaseSettings::host, crawlservpp::Main::inputBackspace, crawlservpp::Main::inputEof, crawlservpp::Main::inputEsc, crawlservpp::Main::inputEtx, crawlservpp::Struct::ServerSettings::logsDeletable, crawlservpp::Struct::DatabaseSettings::name, crawlservpp::Struct::DatabaseSettings::password, crawlservpp::Struct::ServerSettings::port, crawlservpp::Struct::DatabaseSettings::port, crawlservpp::Main::pwPrompt1, crawlservpp::Main::pwPrompt2, crawlservpp::Main::pwPrompt3, crawlservpp::Main::pwPrompt4, crawlservpp::Main::SignalHandler::signal(), crawlservpp::Struct::ServerSettings::sleepOnSqlErrorS, crawlservpp::Main::SignalHandler::tick(), crawlservpp::Struct::NetworkSettings::torControlPassword, crawlservpp::Struct::NetworkSettings::torControlPort, crawlservpp::Struct::NetworkSettings::torControlServer, crawlservpp::Struct::DatabaseSettings::user, and crawlservpp::Main::year.
Referenced by main().
The documentation for this class was generated from the following files: