OGLplus  (0.59.0) a C++ wrapper for rendering APIs

fwd.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_UNITS_FWD_HPP
10 #define EAGINE_UNITS_FWD_HPP
11 
12 #include "../int_constant.hpp"
13 #include "../nothing.hpp"
14 
15 namespace eagine::units {
16 namespace bits {
17 
18 template <typename Head, typename Tail>
19 struct dims;
20 
21 template <typename Dim, int Pow>
22 struct dim_pow;
23 
24 template <typename Head, typename Tail>
25 struct unit_scales;
26 
27 template <typename Unit, typename Scale>
28 struct uni_sca;
29 
30 } // namespace bits
31 
32 namespace base {
33 
34 template <typename Derived>
35 struct dimension;
36 
37 template <typename Dimension, typename Derived>
38 struct unit;
39 
40 template <typename Scale, typename Unit>
41 struct scaled_unit;
42 
43 } // namespace base
44 
45 struct si;
46 
47 template <typename System>
48 struct system_id;
49 
50 template <typename BaseDim, int Pow>
51 using dimension = bits::dims<bits::dim_pow<BaseDim, Pow>, nothing_t>;
52 
53 template <typename Dims, typename System>
54 struct unit;
55 
56 template <typename Dims, typename Scales, typename System>
57 struct custom_dim_unit;
58 
59 template <typename Dims, typename Scales, typename System>
60 struct scaled_dim_unit_conv;
61 
62 template <typename Dims, typename Scales, typename System>
63 using scaled_dim_unit =
64  custom_dim_unit<Dims, scaled_dim_unit_conv<Dims, Scales, System>, System>;
65 
66 template <typename UnitFrom, typename UnitTo>
67 struct value_conv;
68 
69 template <typename U1>
70 struct lit_result;
71 
72 template <typename U1>
73 using lit_result_t = typename lit_result<U1>::type;
74 
75 template <typename U1, typename U2>
76 struct add_result;
77 
78 template <typename U1, typename U2>
79 using add_result_t = typename add_result<U1, U2>::type;
80 
81 template <typename U1, typename U2>
82 struct sub_result;
83 
84 template <typename U1, typename U2>
85 using sub_result_t = typename sub_result<U1, U2>::type;
86 
87 template <typename U1, typename U2>
88 struct mul_l_operand;
89 
90 template <typename U1, typename U2>
91 using mul_l_operand_t = typename mul_l_operand<U1, U2>::type;
92 
93 template <typename U1, typename U2>
94 struct mul_r_operand;
95 
96 template <typename U1, typename U2>
97 using mul_r_operand_t = typename mul_r_operand<U1, U2>::type;
98 
99 template <typename U1, typename U2>
100 struct mul_result;
101 
102 template <typename U1, typename U2>
103 using mul_result_t = typename mul_result<U1, U2>::type;
104 
105 template <typename U1, typename U2>
106 struct div_l_operand : mul_l_operand<U1, U2> {};
107 
108 template <typename U1, typename U2>
109 using div_l_operand_t = typename div_l_operand<U1, U2>::type;
110 
111 template <typename U1, typename U2>
112 struct div_r_operand : mul_r_operand<U1, U2> {};
113 
114 template <typename U1, typename U2>
115 using div_r_operand_t = typename div_r_operand<U1, U2>::type;
116 
117 template <typename U1, typename U2>
118 struct div_result;
119 
120 template <typename U1, typename U2>
121 using div_result_t = typename div_result<U1, U2>::type;
122 
123 template <typename X>
124 struct dimension_of : X::dimension {};
125 
126 template <>
127 struct dimension_of<nothing_t> : nothing_t {};
128 
129 template <typename X>
130 using dimension_of_t = typename dimension_of<X>::type;
131 
132 template <typename X, typename Y>
133 struct same_dimension;
134 
135 template <typename X, typename Y>
136 constexpr bool same_dimension_v = same_dimension<X, Y>::value;
137 
138 template <typename X>
139 struct is_unit;
140 
141 template <typename X>
142 constexpr bool is_unit_v = is_unit<X>::value;
143 
144 template <typename U1, typename U2>
145 struct is_convertible;
146 
147 template <typename U1, typename U2>
148 constexpr bool is_convertible_v = is_convertible<U1, U2>::value;
149 
150 template <typename Item>
151 struct name_of {
152  static constexpr nothing_t mp_str{};
153 };
154 
155 template <typename Item>
156 struct symbol_of {
157  static constexpr nothing_t mp_str{};
158 };
159 
160 } // namespace eagine::units
161 
162 #endif // EAGINE_UNITS_FWD_HPP

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).