Utility class to register a set of configurations Provides also a shared instance through which registered configurations can be shared beyond a single owner.
Using flashmatch::PSet, the uniqueness of configuration parameters is guaranteed (no worry to "overwrite")
.
More...
#include <ConfigManager.h>
Public Member Functions | |
ConfigManager () | |
Default constructor. More... | |
~ConfigManager () | |
Default destructor. More... | |
void | AddConfigFile (const std::string cfg_file) |
Adder of configuration from a file. More... | |
void | AddConfigString (const std::string cfg_str) |
Adder of configuration from parsed string. More... | |
const PSet & | GetConfig (const std::string cfg) |
Configuration retrieval method. More... | |
Static Public Member Functions | |
static const ConfigManager & | get () |
Shared static reference getter. More... | |
Private Attributes | |
std::set< std::string > | _cfg_files |
PSet | _cfg |
Static Private Attributes | |
static ConfigManager * | _me = nullptr |
Utility class to register a set of configurations Provides also a shared instance through which registered configurations can be shared beyond a single owner.
Using flashmatch::PSet, the uniqueness of configuration parameters is guaranteed (no worry to "overwrite")
.
Definition at line 28 of file ConfigManager.h.
|
inline |
|
inline |
void flashmatch::ConfigManager::AddConfigFile | ( | const std::string | cfg_file | ) |
Adder of configuration from a file.
Definition at line 10 of file ConfigManager.cxx.
void flashmatch::ConfigManager::AddConfigString | ( | const std::string | cfg_str | ) |
Adder of configuration from parsed string.
Definition at line 20 of file ConfigManager.cxx.
|
inlinestatic |
Shared static reference getter.
Definition at line 38 of file ConfigManager.h.
const PSet & flashmatch::ConfigManager::GetConfig | ( | const std::string | cfg | ) |
Configuration retrieval method.
Definition at line 27 of file ConfigManager.cxx.
|
private |
Definition at line 54 of file ConfigManager.h.
|
private |
Definition at line 53 of file ConfigManager.h.
|
staticprivate |
Definition at line 52 of file ConfigManager.h.