added support for multi language column selection in configuration files

This commit is contained in:
john30
2017-04-17 09:56:46 +02:00
parent ac90586b15
commit 50d1aee7d3
12 changed files with 227 additions and 99 deletions
+10 -2
View File
@@ -53,9 +53,10 @@ namespace ebusd {
/**
* Get the normalized data field name for the given name.
* @param name the input field name.
* @param supportsLanguage set to true when the field supports multiple language.
* @return the normalized data field name, or empty if unknown.
*/
string getDataFieldName(const string name);
string getDataFieldName(const string name, bool& supportsLanguage);
class DataFieldTemplates;
class SingleDataField;
@@ -86,6 +87,13 @@ class AttributedItem {
virtual ~AttributedItem() {}
/**
* Format an int value to a string.
* @param value the int value.
* @return the formatted string.
*/
static const string formatInt(size_t value);
/**
* Remove and return a certain value from a map.
* @param row the map to remove the value from.
@@ -709,7 +717,7 @@ class DataFieldTemplates : public MappedFileReader {
result_t add(const DataField* field, string name = "", bool replace = false);
// @copydoc
result_t getFieldMap(vector<string>& row, string& errorDescription) const override;
result_t getFieldMap(vector<string>& row, string& errorDescription, const string preferLanguage) const override;
// @copydoc
result_t addFromFile(map<string, string>& row, vector< map<string, string> >& subRows,