--- a/src/INICommand.cpp Sat Nov 21 18:26:39 2020 +0100
+++ b/src/INICommand.cpp Sat Nov 21 20:09:18 2020 +0100
@@ -68,6 +68,7 @@
vector<AttributeMetadata> metadata;
metadata.push_back({L"section", TypeId::STRING});
metadata.push_back({L"key", TypeId::STRING});
+ metadata.push_back({L"subkey", TypeId::STRING});
metadata.push_back({L"value", TypeId::STRING});
writer->startRelation(configuration.relation, metadata, true);
};
@@ -84,14 +85,15 @@
currentSection.pop_back();
};
- void entry(const std::string& key, const std::string& value) override {
+ void entry(const std::string& key, const std::string& subkey, const std::string& value) override {
writer->writeAttribute(convertor.from_bytes(getCurrentSectionFullName()));
writer->writeAttribute(convertor.from_bytes(key));
+ writer->writeAttribute(convertor.from_bytes(subkey));
writer->writeAttribute(convertor.from_bytes(value));
};
// TODO: handle also comments and whitespace (to allow lossless transformation from INI and back to INI)
- // TODO: handle also subkeys (in [] brackets in the key)
+ // TODO: make subkeys (in [] brackets in the key) optional/configurable
};