1
|
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 void writeValue(std::ostream& output, const T& value) = 0;
|
|
18 |
|
|
19 |
virtual void writeString(std::ostream& output, const string_t &stringValue);
|
|
20 |
|
|
21 |
virtual T toValue(const string_t &stringValue) = 0;
|
|
22 |
|
|
23 |
};
|
|
24 |
|
|
25 |
}
|
|
26 |
} |