--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DataTypeWriter.h Sat Jul 21 17:30:25 2018 +0200
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "DataTypeWriterBase.h"
+
+namespace relpipe {
+namespace writer {
+
+template<typename T> class DataTypeWriter : public DataTypeWriterBase {
+public:
+
+ DataTypeWriter(const integer_t typeId, const string_t typeCode) : DataTypeWriterBase(typeId, typeCode) {
+ }
+
+ virtual ~DataTypeWriter() {
+ };
+
+ virtual void writeValue(std::ostream& output, const T& value) = 0;
+
+ void writeString(std::ostream& output, const string_t &stringValue) override {
+ writeValue(output, toValue(stringValue));
+ }
+
+ virtual T toValue(const string_t &stringValue) = 0;
+
+};
+
+}
+}
\ No newline at end of file