diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-05 12:51:35 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-05 12:51:35 +0200 |
commit | f27d397e9ab2d5c020b04dde4361fffa933f103c (patch) | |
tree | 624a0890ba2aed0130b5e58f60098d69e4e304fe /modules/codec-unit/c++/unit.hpp | |
parent | 89c37ae7d84beb08ed99539bee972c241075d45e (diff) |
Implemented basic class and operations
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" |