33#include <NDEVR/BaseValues.h>
34#include <NDEVR/Vector.h>
35#include <NDEVR/ObjectInfo.h>
36#include <NDEVR/TypeInfo.h>
37#include <NDEVR/Angle.h>
40 template<
class t_type_a,
class t_type_b>
41 void assign(t_type_a& a,
const t_type_b& b)
45 template<
class t_type_a>
46 void assign(t_type_a& a,
const t_type_a& b)
50 template<u
int01 t_dim_a,
class t_type_a, u
int01 t_dim_b,
class t_type_b>
53 a = b.template as<t_dim_a, t_type_a>();
55 template<
class t_type_a, u
int01 t_dim_b,
class t_type_b>
60 template<
class t_type_a>
61 void assign(t_type_a& a,
const char* b)
66 template<u
int01 t_dim_a,
class t_type_a, u
int01 t_dim_b,
class t_type_b>
72 template<
class t_type_a, u
int01 t_dim_b,
class t_type_b>
104 template<
class t_type>
106 : m_pointer(reinterpret_cast<t_pointer*>(&value))
110 template<
class t_
object_type>
120 : m_pointer(reference.m_pointer)
122 memcpy(m_bits, reference.m_bits,
sizeof(m_bits));
125 template<
class t_type>
126 constexpr void set(
const t_type& value)
128 m_flag(m_bits, value);
130 template<
class t_type>
140 template<
class t_type>
145 template<
class t_type>
150 template<
class t_type>
151 constexpr operator t_type()
const
155 template<
class t_type>
162 template<
class t_type>
170 template<
class t_type>
173 if (m_bits[level].is_number)
175 if (m_bits[level].is_unsigned)
177 switch (m_bits[level].byte_size)
179 case 1:
assign(value, *(m_pointer->_uint01 + index));
break;
180 case 2:
assign(value, *(m_pointer->_uint02 + index));
break;
181 case 4:
assign(value, *(m_pointer->_uint04 + index));
break;
182 case 8:
assign(value, *(m_pointer->_uint08 + index));
break;
187 if (m_bits[level].is_float)
189 switch (m_bits[level].byte_size)
191 case 4:
assign(value, *(m_pointer->_fltp04 + index));
break;
192 case 8:
assign(value, *(m_pointer->_fltp08 + index));
break;
197 switch (m_bits[level].byte_size)
199 case 1:
assign(value, *(m_pointer->_sint01 + index));
break;
200 case 2:
assign(value, *(m_pointer->_sint02 + index));
break;
201 case 4:
assign(value, *(m_pointer->_sint04 + index));
break;
202 case 8:
assign(value, *(m_pointer->_sint08 + index));
break;
207 else if (m_bits[level].is_string)
209 assign(value, (m_pointer->_char + index));
215 t_pointer*
const m_pointer;
#define lib_assert(expression, message)
Definition LibAssert.h:61
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
Stores information about a type, relevant for certain templated functions. To get information about a...
Definition TypeInfo.h:43
uint02 vector_size
Definition TypeInfo.h:59
An optimized class for storing a reference to a variable of some type up to 8 bytes in size without o...
Definition VariableReference.h:82
t_type get() const
Definition VariableReference.h:156
constexpr VariableReference & operator=(const t_type &b)
Definition VariableReference.h:131
constexpr bool operator==(const t_type &b) const
Definition VariableReference.h:141
void fillInfoTable(const ObjectInfo< t_object_type > &, uint01 level)
Definition VariableReference.h:111
constexpr VariableReference(t_type &value)
Definition VariableReference.h:105
constexpr bool operator!=(const t_type &b) const
Definition VariableReference.h:146
constexpr VariableReference & operator=(const VariableReference &)
Definition VariableReference.h:136
constexpr void set(const t_type &value)
Definition VariableReference.h:126
void get(t_type &value, uint04 level, uint04 index) const
Definition VariableReference.h:163
void getSingle(t_type &value, uint04 level, uint04 index) const
Definition VariableReference.h:171
VariableReference(const VariableReference &reference)
Definition VariableReference.h:119
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
int32_t sint04
-Defines an alias representing a 4 byte, signed integer. -Can represent exact integer values -2147483...
Definition BaseValues.hpp:64
void assign(t_type_a &a, const t_type_b &b)
Definition VariableReference.h:41
constexpr std::enable_if<!ObjectInfo< t_type >::Buffer, TypeInfo >::type GetTypeInfo()
Definition TypeInfo.h:103
int64_t sint08
-Defines an alias representing an 8 byte, signed integer -Can represent exact integer values -9223372...
Definition BaseValues.hpp:71
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
int8_t sint01
-Defines an alias representing a 1 byte, signed integer. -Can represent exact integer values -127 thr...
Definition BaseValues.hpp:50
int16_t sint02
-Defines an alias representing a 2 byte, signed integer. -Can represent exact integer values -32767 t...
Definition BaseValues.hpp:57
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:106
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:375
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:88
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Information about the object.
Definition ObjectInfo.h:54