diff options
Diffstat (limited to 'modules/codec-unit/c++/unit.hpp')
-rw-r--r-- | modules/codec-unit/c++/unit.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/codec-unit/c++/unit.hpp b/modules/codec-unit/c++/unit.hpp new file mode 100644 index 0000000..986ca8f --- /dev/null +++ b/modules/codec-unit/c++/unit.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "unit_schema.hpp" +#include "unit_transform.hpp" + +namespace saw { +template<typename BaseSchema, typename... Elements> +class data<schema::Unit<BaseSchema, Elements...>, encode::Native> { +public: + using Schema = schema::Unit<BaseSchema, Elements...>; +private: + data<BaseSchema, encode::Native> dat_; +public: + data() = default; + + data(data<BaseSchema, encode::Native>&& dat__): + dat_{std::move(dat__)} + {} + + data<Schema, encode::Native> operator+(const data<Schema, encode::Native>& rhs) const; + data<Schema, encode::Native> operator-(const data<Schema, encode::Native>& rhs) const; +}; +} + +#include "unit.tmpl.h" |