highlighter application
1.1
HCE project utils : highlighter
|
#include <ServerApplication.hpp>
Public Member Functions | |
ServerApplication () | |
virtual | ~ServerApplication () throw () |
Protected Member Functions | |
void | initialize (Poco::Util::Application &self) |
void | reinitialize (Poco::Util::Application &self) |
void | uninitialize () |
void | defineOptions (Poco::Util::OptionSet &options) |
this function initializes global variable HCE::_config by filename which sets as value in pair –config-file='filename' | |
void | initializeConfigurationFile () |
this function return true if in configuration file exist section for database connection | |
bool | isDataBaseSectionExists () |
return database connection type (by default it's MySQL) | |
std::string | getDBType () const |
std::string | initializeMySQLConnectionString () const |
std::string | initializeSQLiteConnectionString () const |
this functions must be caused both and if in configure file exists section for database connection | |
void | initializeDataBaseSession () |
void | uninitializeDataBaseSession () |
void | initializeLoggers () |
virtual void | handleConfigFile (const std::string &, const std::string &value) |
this function shows us help information (all options and so on) | |
virtual void | handleHelp (const std::string &name, const std::string &value) |
this function shows us version information (all options and so on) | |
virtual void | handleVersion (const std::string &name, const std::string &value) |
Protected Attributes | |
bool | _configFileRequest |
< if we use default configuration file this variable is setted as false | |
std::string | _configFile |
program would not be started if we use key –help or -h . | |
bool | _showHelpInfo |
bool | _initializedHCEServerApplication |
std::string | dataBaseType |
const std::string | APPLICATION_NOT_INITIALIZED_EXCEPTION = "Class HCE::ServerApplication incorrectly initialized. Maybe problem with configuration,logger or database initializing." |
const std::string | MESSAGE_ALREADY_INITIALIZED_EXCEPTION = "Object already initialized." |
const std::string | NOT_SET_DB_TYPE_ERROR = "Not set database type in configuration type." |
const std::string | ADDITION_INFORM_STRING_NOT_FOUND = "config param or Not found config file" |
< base class for application's class. method main (const std::vectro<string>& argv)
should be overridden in inherited class if you allows that exception can leave from method main , that function uninitialized never be called life cycle : constructor -> initialize -> main -> uninitialize -> destructor
Definition at line 54 of file ServerApplication.hpp.
HCE::ServerApplication::ServerApplication | ( | ) |
Definition at line 15 of file ServerApplication.cpp.
|
virtual |
Definition at line 18 of file ServerApplication.cpp.
|
protected |
this function initializes global variable HCE::_config by filename which sets as value in pair –config-file='filename'
Definition at line 172 of file ServerApplication.cpp.
|
protected |
host=*;user=*;password=*;db=*;compress=*;auto-reconnect=* - mysql db=* - sqlite
Definition at line 161 of file ServerApplication.cpp.
|
protectedvirtual |
this function shows us help information (all options and so on)
Definition at line 199 of file ServerApplication.cpp.
|
protectedvirtual |
this function shows us version information (all options and so on)
Reimplemented in Application.
Definition at line 204 of file ServerApplication.cpp.
|
protectedvirtual |
Reimplemented in Application.
Definition at line 213 of file ServerApplication.cpp.
|
protected |
< if application already initialized throw exception
Definition at line 24 of file ServerApplication.cpp.
|
protected |
this function return true if in configuration file exist section for database connection
< load default configuration file
< load configuration file which determined as argument
Definition at line 71 of file ServerApplication.cpp.
|
protected |
Definition at line 94 of file ServerApplication.cpp.
|
protected |
this function allows us to understand that we will not use default configuration file first parameter not set because we are not using option name
Options must be added handler for help
option
Definition at line 166 of file ServerApplication.cpp.
|
protected |
|
protected |
this functions must be caused both and if in configure file exists section for database connection
Definition at line 151 of file ServerApplication.cpp.
|
protected |
return database connection type (by default it's MySQL)
Definition at line 124 of file ServerApplication.cpp.
|
protected |
Definition at line 60 of file ServerApplication.cpp.
|
protected |
|
protected |
Definition at line 113 of file ServerApplication.cpp.
|
protected |
program would not be started if we use key –help or -h .
Definition at line 96 of file ServerApplication.hpp.
|
protected |
< if we use default configuration file this variable is setted as false
Definition at line 94 of file ServerApplication.hpp.
|
protected |
Definition at line 100 of file ServerApplication.hpp.
|
protected |
this variable does not allow initialize application twise and verifies that our part of application (config,logger,database) correctly installed
Definition at line 98 of file ServerApplication.hpp.
|
protected |
Definition at line 107 of file ServerApplication.hpp.
|
protected |
Definition at line 104 of file ServerApplication.hpp.
|
protected |
Definition at line 101 of file ServerApplication.hpp.
|
protected |
Definition at line 105 of file ServerApplication.hpp.
|
protected |
Definition at line 106 of file ServerApplication.hpp.