equal
deleted
inserted
replaced
|
1 #pragma once |
|
2 |
|
3 #include "DataTypeWriterBase.h" |
|
4 |
|
5 namespace relpipe { |
|
6 namespace writer { |
|
7 |
|
8 template<typename T> class DataTypeWriter : public DataTypeWriterBase { |
|
9 public: |
|
10 |
|
11 DataTypeWriter(const integer_t typeId, const string_t typeCode) : DataTypeWriterBase(typeId, typeCode) { |
|
12 } |
|
13 |
|
14 virtual ~DataTypeWriter() { |
|
15 }; |
|
16 |
|
17 virtual T readValue(std::istream& input) = 0; |
|
18 |
|
19 virtual string_t readString(std::istream &input); |
|
20 |
|
21 virtual void writeValue(std::ostream& output, const T& value) = 0; |
|
22 |
|
23 virtual void writeString(std::ostream& output, const string_t &stringValue); |
|
24 |
|
25 virtual T toValue(const string_t &stringValue) = 0; |
|
26 virtual string_t toString(const T& value) = 0; |
|
27 |
|
28 }; |
|
29 |
|
30 } |
|
31 } |