8 ConfigManager::ConfigManager()
9 : m_top(Json::arrayValue)
27 if (get<string>(
c,
"type") != type) {
30 if (get<string>(
c,
"name") != name) {
41 int ind = this->
index(get<string>(cfg,
"type"), get<string>(cfg,
"name"));
52 cfg[
"data"] = payload;
60 if (ind < 0 || ind >=
size()) {
68 std::vector<ConfigManager::ClassInstance> ret;
70 ret.push_back(make_pair(get<string>(
c,
"type"), get<string>(
c,
"name")));
77 if (ind < 0 || ind >=
size()) {
83 for (
int i=0; i<siz; ++i) {
88 reduced.append(
m_top[i]);
std::vector< ClassInstance > configurables() const
void extend(Configuration more)
Extend current list of configuration objects with more.
int size() const
Return the number of configuration objects.
Configuration at(int index) const
int add(Configuration &cfg)
int index(const std::string &type, const std::string &name="") const
std::string type(const T &t)
Configuration append(Configuration &a, Configuration &b)
Return an array which is composed of the array b appended to the array a.
Json::Value Configuration
Configuration pop(int ind)
Remove configuration at given index and return it.