summaryrefslogtreecommitdiff
path: root/modules/codec-unit/c++/unit.hpp
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-09-01 15:05:08 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-09-01 15:05:08 +0200
commitf5c90428f833a0af26d20488f230a69e82891673 (patch)
tree56370aff52fbd2d67385748e4e64307af4d63909 /modules/codec-unit/c++/unit.hpp
parent55f9635f8818614d1c0e5f2dbfc6eb3de18a7107 (diff)
Fixing deps on modules and adding minor unit logic
Diffstat (limited to 'modules/codec-unit/c++/unit.hpp')
-rw-r--r--modules/codec-unit/c++/unit.hpp25
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"