author | František Kučera <franta-hg@frantovo.cz> |
Sat, 25 Aug 2018 18:16:53 +0200 | |
branch | v_0 |
changeset 14 | e8de089f95dd |
parent 13 | 543f1613c2da |
child 15 | 09ca53671b28 |
permissions | -rw-r--r-- |
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 |
|
14
e8de089f95dd
refactoring, move files, use TypeId instead of integer_t
František Kučera <franta-hg@frantovo.cz>
parents:
13
diff
changeset
|
11 |
DataTypeReader(const TypeId 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 |
} |