alaCarte Maps
Renderer for OpenStreetMap tiles
Application Class Referenceabstract

#include <application.hpp>

Inheritance diagram for Application:
AlacarteImporterApp AlacarteServerApp

Public Member Functions

 Application ()
 Inits the new Application. More...
 
int start (int argc, char **argv)
 Starts the aplication with or without Exceptionhandling. More...
 

Protected Member Functions

virtual void onRun (const shared_ptr< Configuration > &config)=0
 
virtual void customInitLog (const shared_ptr< Configuration > &config)
 
virtual bool startupDiagnostic (const shared_ptr< Configuration > &config)=0
 
bool diagnosticCheckFile (const shared_ptr< Configuration > &config, const string &key)
 

Protected Attributes

boost::program_options::options_description cmd_desc
 
boost::program_options::options_description config_desc
 
boost::program_options::positional_options_description pos_desc
 
shared_ptr< logging::sinks::synchronous_sink< logging::sinks::text_file_backend > > fileLogger
 
shared_ptr< logging::sinks::synchronous_sink< logging::sinks::basic_text_ostream_backend< char > > > consoleLogger
 

Private Member Functions

void appRun (int argc, char **argv)
 Creates the Configuration and runs the application. More...
 
void initLog (const shared_ptr< Configuration > &config)
 Inits the logfile. More...
 

Detailed Description

Definition at line 38 of file application.hpp.

Constructor & Destructor Documentation

Application::Application ( )

Inits the new Application.

Definition at line 38 of file applications.cpp.

Member Function Documentation

void Application::appRun ( int  argc,
char **  argv 
)
private

Creates the Configuration and runs the application.

Parameters
argcnumber of arguments passed to this program
argvarguments passed to this program

Definition at line 79 of file applications.cpp.

virtual void Application::customInitLog ( const shared_ptr< Configuration > &  config)
inlineprotectedvirtual

Reimplemented in AlacarteServerApp.

Definition at line 48 of file application.hpp.

bool Application::diagnosticCheckFile ( const shared_ptr< Configuration > &  config,
const string key 
)
protected

Definition at line 153 of file applications.cpp.

void Application::initLog ( const shared_ptr< Configuration > &  config)
private

Inits the logfile.

Parameters
configConfiguration containing more information about the logfile

Definition at line 130 of file applications.cpp.

virtual void Application::onRun ( const shared_ptr< Configuration > &  config)
protectedpure virtual

Implemented in AlacarteServerApp, and AlacarteImporterApp.

int Application::start ( int  argc,
char **  argv 
)

Starts the aplication with or without Exceptionhandling.

Parameters
argcnumber of arguments passed to this program
argvarguments passed to this program
Returns
Returns 0 if everything was fine and 1 if the program exited unexpected.

Definition at line 50 of file applications.cpp.

virtual bool Application::startupDiagnostic ( const shared_ptr< Configuration > &  config)
protectedpure virtual

Implemented in AlacarteServerApp, and AlacarteImporterApp.

Member Data Documentation

boost::program_options::options_description Application::cmd_desc
protected

Definition at line 51 of file application.hpp.

boost::program_options::options_description Application::config_desc
protected

Definition at line 52 of file application.hpp.

shared_ptr< logging::sinks::synchronous_sink< logging::sinks::basic_text_ostream_backend< char > > > Application::consoleLogger
protected

Definition at line 58 of file application.hpp.

shared_ptr< logging::sinks::synchronous_sink< logging::sinks::text_file_backend > > Application::fileLogger
protected

Definition at line 57 of file application.hpp.

boost::program_options::positional_options_description Application::pos_desc
protected

Definition at line 53 of file application.hpp.


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