reader only reads, writer only writes v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 14 Jul 2018 17:11:40 +0200
branchv_0
changeset 5 7fe870c3362f
parent 4 e6db28447957
child 6 64f382e63e01
reader only reads, writer only writes
include/DataTypeWriter.h
include/DataTypeWriterBase.h
src/DataTypeWriter.cpp
--- a/include/DataTypeWriter.h	Sat Jul 14 13:14:20 2018 +0200
+++ b/include/DataTypeWriter.h	Sat Jul 14 17:11:40 2018 +0200
@@ -14,16 +14,11 @@
 	virtual ~DataTypeWriter() {
 	};
 
-	virtual T readValue(std::istream& input) = 0;
-
-	virtual string_t readString(std::istream &input);
-
 	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;
-	virtual string_t toString(const T& value) = 0;
 
 };
 
--- a/include/DataTypeWriterBase.h	Sat Jul 14 13:14:20 2018 +0200
+++ b/include/DataTypeWriterBase.h	Sat Jul 14 17:11:40 2018 +0200
@@ -23,15 +23,6 @@
 	};
 
 	/**
-	 * @param input input stream, should be at position where the value is to be read; the stream will not be closed afred reading
-	 * @return read value in form of the string representation of given data type.
-	 * E.g. integer 123 is returned as a character string "123",
-	 * boolean true is returned as a character string "true".
-	 * See Relational pipes format specification for details.
-	 */
-	virtual string_t readString(std::istream &input) = 0;
-
-	/**
 	 * @param output output stream, should be at position where the value is to be written; the stream will not be closed not flushed after writing
 	 * @param stringValue write value as given data type (e.g. integer or boolean); stringValue parameter contains given value in string representation of given data type
 	 * E.g. integer 123 is passed as a character string "123"
--- a/src/DataTypeWriter.cpp	Sat Jul 14 13:14:20 2018 +0200
+++ b/src/DataTypeWriter.cpp	Sat Jul 14 17:11:40 2018 +0200
@@ -3,10 +3,6 @@
 namespace relpipe {
 namespace writer {
 
-template<typename T> string_t DataTypeWriter<T>::readString(std::istream &input) {
-	return toString(readValue(input));
-};
-
 template<typename T> void DataTypeWriter<T>::writeString(std::ostream& output, const string_t &stringValue) {
 	writeValue(output, toValue(stringValue));
 };