added: program reads its configuration from a config file
added: confparser directory and confparser.h and confparser.cpp class ConfParser used to parse a config file this is a generic parser, can be used by another project added: config.h, config.cpp class Config used for assigning values from a config file into the data object added: function for signals: SIGINT, SIGHUP after receiving SIGHUP the program will read its config file again git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@463 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
31
core/data.h
31
core/data.h
@@ -23,11 +23,13 @@
|
||||
|
||||
class Data
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// members read from a config file
|
||||
|
||||
|
||||
// name of the config file (full path can be)
|
||||
std::string config_file;
|
||||
|
||||
// log file name
|
||||
std::string log_file;
|
||||
@@ -62,21 +64,30 @@ public:
|
||||
std::string base_url;
|
||||
std::string http_session_id_name;
|
||||
|
||||
|
||||
|
||||
|
||||
Dir dir;
|
||||
|
||||
|
||||
// if there is one item in a directory
|
||||
// it will be showed
|
||||
// (instead of showing directory contents)
|
||||
bool one_item_is_showed;
|
||||
|
||||
|
||||
// end config members
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
// false at the beginning
|
||||
bool stdout_is_closed;
|
||||
|
||||
// true if there was the SIGHUP signal
|
||||
volatile bool signal_hup;
|
||||
|
||||
Dir dir;
|
||||
|
||||
|
||||
|
||||
|
||||
Data();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user