equal
deleted
inserted
replaced
24 private: |
24 private: |
25 IntegerDataTypeWriter integerType; |
25 IntegerDataTypeWriter integerType; |
26 std::wstring_convert<std::codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings. |
26 std::wstring_convert<std::codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings. |
27 public: |
27 public: |
28 |
28 |
29 StringDataTypeWriter() : DataTypeWriter<string_t>(DATA_TYPE_ID_STRING, DATA_TYPE_CODE_STRING) { |
29 StringDataTypeWriter() : DataTypeWriter<string_t>(TypeId::STRING, DATA_TYPE_CODE_STRING) { |
30 } |
30 } |
31 |
31 |
32 void writeValue(std::ostream &output, const string_t &value) override { |
32 void writeValue(std::ostream &output, const string_t &value) override { |
33 std::string s = convertor.to_bytes(value); |
33 std::string s = convertor.to_bytes(value); |
34 integerType.writeValue(output, s.length()); |
34 integerType.writeValue(output, s.length()); |