#include <ConfigManager.h>
Public Types | |
typedef std::pair< std::string, std::string > | ClassInstance |
Return a list of all known configurables. More... | |
Public Member Functions | |
ConfigManager () | |
~ConfigManager () | |
void | extend (Configuration more) |
Extend current list of configuration objects with more. More... | |
int | add (Configuration &cfg) |
int | add (Configuration &data, const std::string &type, const std::string &name="") |
Configuration | all () const |
Return top-level, aggregate configuration. More... | |
Configuration | at (int index) const |
int | index (const std::string &type, const std::string &name="") const |
int | size () const |
Return the number of configuration objects. More... | |
Configuration | pop (int ind) |
Remove configuration at given index and return it. More... | |
std::vector< ClassInstance > | configurables () const |
Private Attributes | |
Configuration | m_top |
Bundle up some policy for handling configuration.
Overall configuration object is a list of configuration objects for each configurable instance.
Each instance configuration is a dict with keys:
Definition at line 20 of file ConfigManager.h.
typedef std::pair<std::string, std::string> WireCell::ConfigManager::ClassInstance |
Return a list of all known configurables.
Definition at line 52 of file ConfigManager.h.
ConfigManager::ConfigManager | ( | ) |
Definition at line 8 of file ConfigManager.cxx.
ConfigManager::~ConfigManager | ( | ) |
Definition at line 12 of file ConfigManager.cxx.
int ConfigManager::add | ( | Configuration & | cfg | ) |
Definition at line 39 of file ConfigManager.cxx.
int ConfigManager::add | ( | Configuration & | data, |
const std::string & | type, | ||
const std::string & | name = "" |
||
) |
Definition at line 49 of file ConfigManager.cxx.
|
inline |
Configuration ConfigManager::at | ( | int | index | ) | const |
Definition at line 58 of file ConfigManager.cxx.
std::vector< ConfigManager::ClassInstance > ConfigManager::configurables | ( | ) | const |
Definition at line 66 of file ConfigManager.cxx.
void ConfigManager::extend | ( | Configuration | more | ) |
Extend current list of configuration objects with more.
Definition at line 16 of file ConfigManager.cxx.
int ConfigManager::index | ( | const std::string & | type, |
const std::string & | name = "" |
||
) | const |
Return index of configuration for given class and instance names. If not found, returned index == -1;
Definition at line 22 of file ConfigManager.cxx.
Configuration ConfigManager::pop | ( | int | ind | ) |
Remove configuration at given index and return it.
Definition at line 75 of file ConfigManager.cxx.
|
inline |
|
private |
Definition at line 21 of file ConfigManager.h.