# HG changeset patch # User František Kučera # Date 1531581100 -7200 # Node ID 7fe870c3362fc7f3b04bacd84c5782ed795a2272 # Parent e6db2844795770690ceaaba6e8048808071e3bc0 reader only reads, writer only writes diff -r e6db28447957 -r 7fe870c3362f include/DataTypeWriter.h --- 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; }; diff -r e6db28447957 -r 7fe870c3362f include/DataTypeWriterBase.h --- 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" diff -r e6db28447957 -r 7fe870c3362f src/DataTypeWriter.cpp --- 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 string_t DataTypeWriter::readString(std::istream &input) { - return toString(readValue(input)); -}; - template void DataTypeWriter::writeString(std::ostream& output, const string_t &stringValue) { writeValue(output, toValue(stringValue)); };