9 Poco::Util::PropertyFileConfiguration(path),
data() { this->
parse(); }
20 for (
auto it = this->begin(); it != this->end(); ++it) {
21 Poco::StringTokenizer record (it->first,
".");
22 std::string section ( *record.begin() );
23 std::string
key ( *( record.end()-1) );
24 std::string value (it->second);
25 data[section].push_back(std::pair<_key,_value>(key,value));
30 std::string sphinxConfig(
"");
31 for (std::map<_section,std::vector<std::pair<_key,_value>>>::const_iterator iteratorOnMap = this->data.begin(); iteratorOnMap != this->data.end(); ++iteratorOnMap) {
32 sphinxConfig += (iteratorOnMap->first +
"\n{\n");
33 for (std::vector<std::pair<_key,_value> >::const_iterator iteratorOnVector = iteratorOnMap->second.begin(); iteratorOnVector != iteratorOnMap->second.end(); ++iteratorOnVector) {
34 sphinxConfig += (iteratorOnVector->first +
" = " + iteratorOnVector->second +
"\n");
36 sphinxConfig +=
"}\n";
42 auto pointerToTheDataWithOldName = this->data.find(oldName);
43 if (pointerToTheDataWithOldName != data.end()) {
44 auto dataWhereKeyIsOldName (pointerToTheDataWithOldName->second);
45 this->data[newName] = dataWhereKeyIsOldName;
47 for (Poco::Util::MapConfiguration::StringMap::const_iterator it=this->begin();it!=this->end();++it) {
48 Poco::StringTokenizer record (it->first,
".");
49 std::string section ( *record.begin() );
50 std::string
key ( *( record.end()-1) );
51 std::string value (it->second);
53 if (oldName==section) {
54 setString(newName+
"."+key, value);
61 auto pointerToTheDataWithOldName = this->data.find(oldName);
62 if (pointerToTheDataWithOldName != data.end()) {
63 auto dataWhereKeyIsOldName (pointerToTheDataWithOldName->second);
64 this->data[newName] = dataWhereKeyIsOldName;
66 pointerToTheDataWithOldName = this->data.find(oldName);
67 if (pointerToTheDataWithOldName != data.end()) {
68 this->data.erase(pointerToTheDataWithOldName);
73 auto pointerToTheSection = this->data.find(sectionName);
74 if (pointerToTheSection != data.end()) {
75 this->data.erase(pointerToTheSection);