diff options
Diffstat (limited to 'modules/codec-unit/c++/unit.hpp')
-rw-r--r-- | modules/codec-unit/c++/unit.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/codec-unit/c++/unit.hpp b/modules/codec-unit/c++/unit.hpp index 986ca8f..0e7bf74 100644 --- a/modules/codec-unit/c++/unit.hpp +++ b/modules/codec-unit/c++/unit.hpp @@ -3,6 +3,8 @@ #include "unit_schema.hpp" #include "unit_transform.hpp" +#include <forstio/codec/data.hpp> + namespace saw { template<typename BaseSchema, typename... Elements> class data<schema::Unit<BaseSchema, Elements...>, encode::Native> { @@ -19,7 +21,15 @@ public: data<Schema, encode::Native> operator+(const data<Schema, encode::Native>& rhs) const; data<Schema, encode::Native> operator-(const data<Schema, encode::Native>& rhs) const; + + bool operator==(const data<Schema, encode::Native>& rhs) const; + + template<typename UnitRhs> + data<typename unit_multiplication<Schema, UnitRhs>::Schema, encode::Native> operator*(const data<UnitRhs, encode::Native>& rhs) const; + + template<typename UnitRhs> + data<typename unit_division<Schema, UnitRhs>::Schema, encode::Native> operator/(const data<UnitRhs, encode::Native>& rhs) const; }; } -#include "unit.tmpl.h" +#include "unit.tmpl.hpp" |