src/types/StringDataTypeWriter.h
branchv_0
changeset 56 4bd3bc41b579
parent 41 744b61559eb2
child 57 08c392fc66e4
equal deleted inserted replaced
55:9d88e8f0a869 56:4bd3bc41b579
    34 namespace writer {
    34 namespace writer {
    35 namespace types {
    35 namespace types {
    36 
    36 
    37 using namespace relpipe::protocol;
    37 using namespace relpipe::protocol;
    38 using namespace relpipe::writer;
    38 using namespace relpipe::writer;
    39 /**
       
    40  * The prototype does not recognize any encoding,
       
    41  * it just works with c++ strings in encoding default to given platform. 
       
    42  * In the real implementation of relational pipes, there will be DataTypes for particular encodings.
       
    43  */
       
    44 class StringDataTypeWriter : public DataTypeWriter<string_t> {
    39 class StringDataTypeWriter : public DataTypeWriter<string_t> {
    45 private:
    40 private:
    46 	IntegerDataTypeWriter integerType;
    41 	IntegerDataTypeWriter integerType;
    47 	std::wstring_convert<std::codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
    42 	std::wstring_convert<std::codecvt_utf8<wchar_t>> convertor;
    48 public:
    43 public:
    49 
    44 
    50 	StringDataTypeWriter() : DataTypeWriter<string_t>(TypeId::STRING, DATA_TYPE_CODE_STRING) {
    45 	StringDataTypeWriter() : DataTypeWriter<string_t>(TypeId::STRING, DATA_TYPE_CODE_STRING) {
    51 	}
    46 	}
    52 
    47