#include <ManagerConfig.h>
Public Member Functions | |
ManagerConfig () | |
ManagerConfig constructor. | |
ManagerConfig (int argc, char **argv) | |
ManagerConfig constructor. | |
virtual | ~ManagerConfig () |
ManagerConfig destructor. | |
Properties | init () |
Initialization. | |
Properties | init (int argc, char **argv) |
Initialization. | |
Properties | getConfig () const |
Get configuration value. | |
Static Public Attributes | |
static const char * | config_file_path [] |
static const char * | config_file_env |
Protected Member Functions | |
void | parseArgs (int argc, char **argv) |
Parse command arguments. | |
bool | findConfigFile () |
Find configuration file. | |
void | setSystemInformation (Properties &prop) |
Set system information. | |
bool | fileExist (const std::string &filename) |
Check file existance. | |
Protected Attributes | |
std::string | m_configFile |
Properties | m_properties |
|
ManagerConfig constructor. Do nothing. |
|
ManagerConfig constructor. The constructor that performs initialization at the same time with given arguments.
|
|
ManagerConfig destructor.
|
|
Check file existance.
|
|
Find configuration file.
|
|
Get configuration value. This operation returns default configuration statically defined, when before calling init() function. When after calling init() function, this operation returns initialized configuration value according to command option, environment value and so on. |
|
Initialization. Initialize with command line options. The following command options are available.
-f file : Specify a configuration file. |
|
Initialization. This operation searches the configuration file from default search path, and initialize and return default properties. If there is no configuration file in the default search path, default configuration statically defined is used.
|
|
Parse command arguments.
-f file : Specify a configuration file. |
|
Set system information. Get the following system info and set them to Manager's properties. manager.os.name : OS name manager.os.release : OS release name maanger.os.version : OS version manager.os.arch : OS architecture manager.os.hostname: Hostname manager.pid : process ID |
|
|
|
|
|
|
|
|