src/DataTypeReader.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 25 Aug 2018 17:39:27 +0200
branchv_0
changeset 13 543f1613c2da
parent 10 include/relpipe/reader/DataTypeReader.h@7fe3975f7e4b
child 14 e8de089f95dd
permissions -rw-r--r--
move non-public headers from include to src
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
#pragma once
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
2
fc3a84a62dd9 rename writers to readers
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     3
#include "DataTypeReaderBase.h"
1
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
namespace relpipe {
4
da021e58c946 rename 'writer' namespace to 'reader'
František Kučera <franta-hg@frantovo.cz>
parents: 2
diff changeset
     6
namespace reader {
1
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
2
fc3a84a62dd9 rename writers to readers
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     8
template<typename T> class DataTypeReader : public DataTypeReaderBase {
1
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
public:
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
2
fc3a84a62dd9 rename writers to readers
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    11
	DataTypeReader(const integer_t typeId, const string_t typeCode) : DataTypeReaderBase(typeId, typeCode) {
1
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
	}
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
2
fc3a84a62dd9 rename writers to readers
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    14
	virtual ~DataTypeReader() {
1
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
	};
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
	virtual T readValue(std::istream& input) = 0;
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
	virtual string_t readString(std::istream &input);
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
	virtual string_t toString(const T& value) = 0;
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
};
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
}
c80d55cdb42d copy of .cpp and .h from relpipe-lib-writer.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
}