crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
crawlservpp::Main::App Class Referencefinal

Main application. More...

#include <App.hpp>

Inheritance diagram for crawlservpp::Main::App:
Collaboration diagram for crawlservpp::Main::App:

Construction and Destruction

 App (const std::vector< std::string > &args) noexcept
 Constructor. More...
 
virtual ~App ()
 Destructor waiting for active threads before cleaning up the application. More...
 

Execution

int run () noexcept
 Runs the application. More...
 

Copy and Move

The class is neither copyable, nor moveable.

 App (App &)=delete
 Deleted copy constructor. More...
 
Appoperator= (App &)=delete
 Deleted copy assignment operator. More...
 
 App (App &&)=delete
 Deleted move constructor. More...
 
Appoperator= (App &&)=delete
 Deleted move assignment operator. More...
 

Tick

void tick ()
 Checks for interrupting signal. More...
 

Signal Handling

static void signal (int signalNumber)
 Static signal handler. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ 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
argsConstant reference to a vector contining the program arguments passed to the application, e.g. via the command line.

◆ ~App()

crawlservpp::Main::App::~App ( )
virtual

Destructor waiting for active threads before cleaning up the application.

References crawlservpp::Helper::DateTime::secondsToString().

◆ App() [2/3]

crawlservpp::Main::App::App ( App )
delete

Deleted copy constructor.

◆ App() [3/3]

crawlservpp::Main::App::App ( App &&  )
delete

Deleted move constructor.

Member Function Documentation

◆ 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: