33#include <NDEVR/Vector.h>
53 template<typename t_type, bool is_vector = IsVec<t_type>::value,
bool is_buffer = std::is_base_of<BufferBase, t_type>::value>
65 template<
typename t_type>
69 static const uint01 Dimensions = 0;
71 static const bool Vector =
false;
73 static const bool Buffer =
false;
75 static const bool Primitive = std::is_integral<t_type>::value || std::is_floating_point<t_type>::value || std::is_enum<t_type>::value || std::is_pointer<t_type>::value;
77 static const bool Pointer = std::is_pointer<t_type>::value;
79 static const bool Unsigned = std::is_unsigned<t_type>::value;
81 static const bool Float = std::is_floating_point<t_type>::value;
83 static const bool Integer = std::is_integral<t_type>::value;
85 static const bool Number = std::is_integral<t_type>::value || std::is_floating_point<t_type>::value;
87 static const bool Enum = std::is_enum<t_type>::value;
89 static const bool String =
false;
91 static const bool Color =
false;
93 static const bool Boolean =
false;
117 template<
typename t_type>
118 struct ObjectInfo<t_type, true, false>
120 static const uint01 Dimensions = t_type::NumberOfDimensions();
121 static const bool Vector =
true;
122 static const bool Buffer =
false;
123 static const bool Primitive = ObjectInfo<
decltype(t_type::Type())>::Primitive;
124 static const bool Pointer = ObjectInfo<
decltype(t_type::Type())>::Pointer;
125 static const bool Unsigned = ObjectInfo<
decltype(t_type::Type())>::Unsigned;
126 static const bool Float = ObjectInfo<
decltype(t_type::Type())>::Float;
127 static const bool Integer = ObjectInfo<
decltype(t_type::Type())>::Integer;
128 static const bool Number = ObjectInfo<
decltype(t_type::Type())>::Number;
129 static const bool String = ObjectInfo<
decltype(t_type::Type())>::String;
130 static const bool Color = ObjectInfo<
decltype(t_type::Type())>
::Color;
131 static const bool Boolean = ObjectInfo<
decltype(t_type::Type())>::Boolean;
132 static constexpr ObjectInfo<
decltype(t_type::Type())> VectorSub() {
return ObjectInfo<decltype(t_type::Type())>(); }
135 template<
typename t_type>
136 struct ObjectInfo<t_type, false, true>
138 static const uint01 Dimensions = 0;
139 static const bool Vector =
false;
140 static const bool Buffer =
true;
141 static const bool Primitive =
false;
142 static const bool Pointer = ObjectInfo<
decltype(t_type::Type())>::Pointer;
143 static const bool Unsigned = ObjectInfo<
decltype(t_type::Type())>::Unsigned;
144 static const bool Float = ObjectInfo<
decltype(t_type::Type())>::Float;
145 static const bool Integer = ObjectInfo<
decltype(t_type::Type())>::Integer;
146 static const bool Number = ObjectInfo<
decltype(t_type::Type())>::Number;
147 static const bool String = ObjectInfo<
decltype(t_type::Type())>::String;
148 static const bool Color = ObjectInfo<
decltype(t_type::Type())>
::Color;
149 static const bool Boolean = ObjectInfo<
decltype(t_type::Type())>::Boolean;
150 static constexpr ObjectInfo<
decltype(t_type::Type())> VectorSub() {
return ObjectInfo<decltype(t_type::Type())>(); }
154 struct ObjectInfo<bool, false, false>
156 static const uint01 Dimensions = 0;
157 static const bool Vector =
false;
158 static const bool Buffer =
false;
159 static const bool Primitive =
true;
160 static const bool Pointer =
false;
161 static const bool Unsigned =
false;
162 static const bool Float =
false;
163 static const bool Integer =
false;
164 static const bool Number =
false;
165 static const bool Enum =
false;
166 static const bool String =
false;
167 static const bool Color =
false;
168 static const bool Boolean =
true;
169 static constexpr ObjectInfo<bool, false, false> VectorSub() {
return ObjectInfo<bool, false, false>(); }
172 struct ObjectInfo<char, false, false>
174 static const uint01 Dimensions = 0;
175 static const bool Vector =
false;
176 static const bool Buffer =
false;
177 static const bool Primitive =
true;
178 static const bool Pointer =
false;
179 static const bool Unsigned =
false;
180 static const bool Float =
false;
181 static const bool Integer =
false;
182 static const bool Number =
false;
183 static const bool Enum =
false;
184 static const bool String =
false;
185 static const bool Color =
false;
186 static const bool Boolean =
false;
187 static constexpr ObjectInfo<char, false> VectorSub() {
return ObjectInfo<char, false>(); }
190 template<
class t_first_type,
class t_second_type>
191 struct ObjectInfo<
std::pair<t_first_type, t_second_type>, false, false>
193 static const uint01 Dimensions = 0;
194 static const bool Vector =
false;
195 static const bool Buffer =
false;
196 static const bool Primitive = ObjectInfo<t_first_type>::Primitive && ObjectInfo<t_second_type>::Primitive;
197 static const bool Pointer =
false;
198 static const bool Unsigned =
false;
199 static const bool Float =
false;
200 static const bool Integer =
false;
201 static const bool Number =
false;
202 static const bool Enum =
false;
203 static const bool String =
false;
204 static const bool Color =
false;
205 static const bool Boolean =
false;
206 static constexpr ObjectInfo<std::pair<t_first_type, t_second_type>,
false> VectorSub() {
return ObjectInfo<std::pair<t_first_type, t_second_type>,
false>(); }
A dummy class for easy tracking of inheritance with templated Buffers.
Definition ObjectInfo.h:42
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
The core Color class in the NDEVR API. Colors can be defined in several ways. The ACIColor is compact...
Definition Color.h:41
Provides shared ownership of a dynamically allocated object.
Definition Pointer.hpp:71
The core String class for the NDEVR API.
Definition String.h:69
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
Information about the object.
Definition ObjectInfo.h:54