summaryrefslogtreecommitdiff
path: root/modules/codec-unit/c++/unit_schema.hpp
blob: a675e2384e08346ac54e32bdb8361b8542cfd122 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <forstio/codec/schema.hpp>

namespace saw {
namespace schema {
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 {
	using Schema = BaseSchema;
};

template<typename BaseSchema>
using Pure = Unit<BaseSchema>;
}
}