# HG changeset patch # User František Kučera # Date 1535211567 -7200 # Node ID 543f1613c2da71cf5e0d44f0de60c6478073baf7 # Parent 2d71092864084169bc63c0aa37e0b2ca1743008e move non-public headers from include to src diff -r 2d7109286408 -r 543f1613c2da include/relpipe/reader/DataTypeReader.h --- a/include/relpipe/reader/DataTypeReader.h Sat Aug 25 17:04:11 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -#pragma once - -#include "DataTypeReaderBase.h" - -namespace relpipe { -namespace reader { - -template class DataTypeReader : public DataTypeReaderBase { -public: - - DataTypeReader(const integer_t typeId, const string_t typeCode) : DataTypeReaderBase(typeId, typeCode) { - } - - virtual ~DataTypeReader() { - }; - - virtual T readValue(std::istream& input) = 0; - - virtual string_t readString(std::istream &input); - - virtual string_t toString(const T& value) = 0; - -}; - -} -} \ No newline at end of file diff -r 2d7109286408 -r 543f1613c2da include/relpipe/reader/DataTypeReaderBase.h --- a/include/relpipe/reader/DataTypeReaderBase.h Sat Aug 25 17:04:11 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -#pragma once - -#include -#include "typedefs.h" - -namespace relpipe { -namespace reader { - -/** - * This class contains common features that are independent from particular data type (generic/template type) - */ -class DataTypeReaderBase { -private: - const integer_t typeId; - const string_t typeCode; -public: - - DataTypeReaderBase(const integer_t typeId, const string_t typeCode) : - typeId(typeId), typeCode(typeCode) { - } - - virtual ~DataTypeReaderBase() { - }; - - /** - * @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 dataType data type code as defined in DDP L0 - * @return whether this class supports conversions of this type - */ - virtual bool supports(const integer_t &dataType); - - /** - * @param dataType data type name as defined in DDP L0 - * @return whether this class supports conversions of this type - */ - virtual bool supports(const string_t &dataType); - - integer_t getTypeId(); - - string_t getTypeCode(); -}; - -} -} \ No newline at end of file diff -r 2d7109286408 -r 543f1613c2da nbproject/configurations.xml --- a/nbproject/configurations.xml Sat Aug 25 17:04:11 2018 +0200 +++ b/nbproject/configurations.xml Sat Aug 25 17:39:27 2018 +0200 @@ -5,11 +5,11 @@ displayName="Header Files" projectFiles="true"> src/BooleanDataTypeReader.h - include/relpipe/reader/DataTypeReader.h - include/relpipe/reader/DataTypeReaderBase.h + src/DataTypeReader.h + src/DataTypeReaderBase.h src/DataTypeReaderCatalog.h src/IntegerDataTypeReader.h - include/relpipe/reader/RelpipeReaderException.h + src/RelpipeReaderException.h src/StringDataTypeReader.h include/relpipe/reader/TypeId.h include/relpipe/reader/typedefs.h @@ -49,21 +49,6 @@ -fsanitize=address - - - - - - @@ -72,12 +57,18 @@ + + + + + + @@ -101,21 +92,6 @@ 5 - - - - - - @@ -124,12 +100,18 @@ + + + + + + diff -r 2d7109286408 -r 543f1613c2da src/DataTypeReader.cpp --- a/src/DataTypeReader.cpp Sat Aug 25 17:04:11 2018 +0200 +++ b/src/DataTypeReader.cpp Sat Aug 25 17:39:27 2018 +0200 @@ -1,4 +1,4 @@ -#include "../include/relpipe/reader/DataTypeReader.h" +#include "DataTypeReader.h" namespace relpipe { namespace reader { diff -r 2d7109286408 -r 543f1613c2da src/DataTypeReader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/DataTypeReader.h Sat Aug 25 17:39:27 2018 +0200 @@ -0,0 +1,26 @@ +#pragma once + +#include "DataTypeReaderBase.h" + +namespace relpipe { +namespace reader { + +template class DataTypeReader : public DataTypeReaderBase { +public: + + DataTypeReader(const integer_t typeId, const string_t typeCode) : DataTypeReaderBase(typeId, typeCode) { + } + + virtual ~DataTypeReader() { + }; + + virtual T readValue(std::istream& input) = 0; + + virtual string_t readString(std::istream &input); + + virtual string_t toString(const T& value) = 0; + +}; + +} +} \ No newline at end of file diff -r 2d7109286408 -r 543f1613c2da src/DataTypeReaderBase.cpp --- a/src/DataTypeReaderBase.cpp Sat Aug 25 17:04:11 2018 +0200 +++ b/src/DataTypeReaderBase.cpp Sat Aug 25 17:39:27 2018 +0200 @@ -1,5 +1,5 @@ #include -#include "../include/relpipe/reader/DataTypeReaderBase.h" +#include "DataTypeReaderBase.h" namespace relpipe { namespace reader { diff -r 2d7109286408 -r 543f1613c2da src/DataTypeReaderBase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/DataTypeReaderBase.h Sat Aug 25 17:39:27 2018 +0200 @@ -0,0 +1,52 @@ +#pragma once + +#include +#include "../include/relpipe/reader/typedefs.h" + +namespace relpipe { +namespace reader { + +/** + * This class contains common features that are independent from particular data type (generic/template type) + */ +class DataTypeReaderBase { +private: + const integer_t typeId; + const string_t typeCode; +public: + + DataTypeReaderBase(const integer_t typeId, const string_t typeCode) : + typeId(typeId), typeCode(typeCode) { + } + + virtual ~DataTypeReaderBase() { + }; + + /** + * @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 dataType data type code as defined in DDP L0 + * @return whether this class supports conversions of this type + */ + virtual bool supports(const integer_t &dataType); + + /** + * @param dataType data type name as defined in DDP L0 + * @return whether this class supports conversions of this type + */ + virtual bool supports(const string_t &dataType); + + integer_t getTypeId(); + + string_t getTypeCode(); +}; + +} +} \ No newline at end of file