diff -r 543f1613c2da -r e8de089f95dd src/DataTypeReaderBase.h --- a/src/DataTypeReaderBase.h Sat Aug 25 17:39:27 2018 +0200 +++ b/src/DataTypeReaderBase.h Sat Aug 25 18:16:53 2018 +0200 @@ -1,6 +1,7 @@ #pragma once #include +#include "../include/relpipe/reader/TypeId.h" #include "../include/relpipe/reader/typedefs.h" namespace relpipe { @@ -11,11 +12,11 @@ */ class DataTypeReaderBase { private: - const integer_t typeId; + const TypeId typeId; const string_t typeCode; public: - DataTypeReaderBase(const integer_t typeId, const string_t typeCode) : + DataTypeReaderBase(const TypeId typeId, const string_t typeCode) : typeId(typeId), typeCode(typeCode) { } @@ -35,17 +36,25 @@ * @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); + virtual bool supports(const TypeId &dataType) { + return dataType == typeId; + } /** * @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); + virtual bool supports(const string_t &dataType) { + return dataType == typeCode; + } - integer_t getTypeId(); + TypeId getTypeId() { + return typeId; + } - string_t getTypeCode(); + string_t getTypeCode() { + return typeCode; + } }; }