Commit 920b539b authored by Micha Mueller's avatar Micha Mueller
Browse files

Minor improvement to ConfiguratorTemplate

parent 309fbb68
......@@ -93,10 +93,7 @@ public:
if (boost::iequals(val.first, "template_" + _entityName)) {
LOG(debug) << "Template " << _entityName << " \"" << val.second.data() << "\"";
if (!val.second.empty()) {
//TODO how to handle Entity at compile time?
//possible solutions: preprocessor defines (ugly), partial template specialization(code duplication), inheritance (complicated structure)
#if 0
SEntity* entity = new SEntity(val.second.data());
SEntity* entity = new SEntity(/*val.second.data()*/);
if (readSensorEntity(*entity, val.second)) {
auto ret = _templateSensorEntitys.insert(std::pair<std::string, SEntity*>(val.second.data(), entity));
if(!ret.second) {
......@@ -105,7 +102,6 @@ public:
} else {
LOG(warning) << "Template " << _entityName << " \"" << val.second.data() << "\" has bad values! Ignoring...";
}
#endif
}
//template group
} else if (boost::iequals(val.first, "template_" + _groupName)) {
......@@ -125,14 +121,12 @@ public:
} else if (boost::iequals(val.first, _entityName)) {
LOG(debug) << _entityName << " \"" << val.second.data() << "\"";
if (!val.second.empty()) {
#if 0
SEntity* entity = new SEntity(val.second.data());
SEntity* entity = new SEntity(/*val.second.data()*/);
if (readSensorEntity(*entity, val.second)) {
_sensorEntitys.push_back(entity);
} else {
LOG(warning) << _entityName << " \"" << val.second.data() << "\" has bad values! Ignoring...";
}
#endif
}
//group
} else if (boost::iequals(val.first, _groupName)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment