include/DataTypeWriter.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 14 Jul 2018 23:24:10 +0200
branchv_0
changeset 7 01dd90eeedbb
parent 5 7fe870c3362f
permissions -rw-r--r--
add data type and catalog classes from the prototype

#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;

	virtual void writeString(std::ostream& output, const string_t &stringValue);

	virtual T toValue(const string_t &stringValue) = 0;

};

}
}