summaryrefslogtreecommitdiff
path: root/modules/codec-unit/c++/unit_schema.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-08-04 16:16:32 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-08-04 16:16:32 +0200
commit4bde4893c9ab3a0d09570946b67734751bc84408 (patch)
tree29916f5319d541214c2e9180a0c01357a59953b4 /modules/codec-unit/c++/unit_schema.hpp
parent728fe910b288321760042d5aa520eedeabb3af96 (diff)
downloadforstio-forstio-4bde4893c9ab3a0d09570946b67734751bc84408.tar.gz
Pushing something
Diffstat (limited to 'modules/codec-unit/c++/unit_schema.hpp')
-rw-r--r--modules/codec-unit/c++/unit_schema.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/codec-unit/c++/unit_schema.hpp b/modules/codec-unit/c++/unit_schema.hpp
index 5de8770..a675e23 100644
--- a/modules/codec-unit/c++/unit_schema.hpp
+++ b/modules/codec-unit/c++/unit_schema.hpp
@@ -4,11 +4,17 @@
namespace saw {
namespace schema {
-template<typename Unit, int64_t Exponent>
-struct UnitElement {};
+template<typename Un, int64_t Expo = 0, int64_t Scal = 0>
+struct UnitElement {
+ using Schema = Un;
+ static constexpr int64_t Exponent = Expo;
+ static constexpr int64_t Scaling = Scal;
+};
template<typename BaseSchema, typename ... Components>
-struct Unit {};
+struct Unit {
+ using Schema = BaseSchema;
+};
template<typename BaseSchema>
using Pure = Unit<BaseSchema>;