#include <ManagerConfig.h>
Public Member Functions | |
ManagerConfig () | |
ManagerConfig constructor. | |
ManagerConfig (int argc, char **argv) | |
ManagerConfig constructor. | |
virtual | ~ManagerConfig () |
ManagerConfig destructor. | |
void | init (int argc, char **argv) |
Initialization Initialization. | |
void | configure (Properties &prop) |
Apply configuration results to Property. | |
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 |
|
ManagerConfig constructor. Do nothing. |
|
ManagerConfig constructor. The constructor that performs initialization at the same time with given arguments.
|
|
ManagerConfig destructor.
|
|
Apply configuration results to Property.
|
|
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 Initialization. Initialize with command line options. The following command options are available.
-f file : Specify a configuration file. |
|
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 |
|
|
|
|
|
|