144 |
144 |
145 Option(std::wstring name, std::wstring value) : name(name), value(value) { |
145 Option(std::wstring name, std::wstring value) : name(name), value(value) { |
146 } |
146 } |
147 }; |
147 }; |
148 |
148 |
|
149 private: |
149 std::vector<std::wstring> versionsSupported; |
150 std::vector<std::wstring> versionsSupported; |
150 std::vector<AttributeMetadata> inputAttributes; |
151 std::vector<AttributeMetadata> inputAttributes; |
151 std::vector<std::wstring> outputAttributeAliases; |
152 std::vector<std::wstring> outputAttributeAliases; |
152 std::vector<Option> options; |
153 std::vector<Option> options; |
153 std::wstring currentRelation; |
154 std::wstring currentRelation; |
154 std::wstring currentFile; |
155 std::wstring currentFile; |
155 |
|
156 std::wstring_convert < std::codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings. Or use always UTF-8 for communication with subprocesses. |
156 std::wstring_convert < std::codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings. Or use always UTF-8 for communication with subprocesses. |
|
157 |
|
158 protected: |
|
159 |
|
160 /** |
|
161 * n.b. generic streamlet (later in relpipe-tr-streamler) will not have currentFile |
|
162 */ |
|
163 std::wstring getCurrentFile() { |
|
164 return currentFile; |
|
165 } |
|
166 |
|
167 std::wstring getCurrentRelation() { |
|
168 return currentRelation; |
|
169 } |
|
170 |
|
171 std::wstring fromBytes(std::string s) { |
|
172 return convertor.from_bytes(s); |
|
173 } |
|
174 |
|
175 std::string toBytes(std::wstring s) { |
|
176 return convertor.to_bytes(s); |
|
177 } |
157 |
178 |
158 static const std::wstring BOOLEAN; |
179 static const std::wstring BOOLEAN; |
159 static const std::wstring INTEGER; |
180 static const std::wstring INTEGER; |
160 static const std::wstring STRING; |
181 static const std::wstring STRING; |
161 |
182 |