34#include <NDEVR/LibAssert.h>
231 template<
class t_type>
298 template<
class t_to,
class t_from>
299 constexpr t_to
cast(t_from value)
301 return static_cast<t_to
>(value);
323 return static_cast<uint04>(value);
344 return static_cast<uint04>(value);
365 return static_cast<uint04>(value);
386 return static_cast<uint04>(value);
402 template<
class t_to,
class t_from>
405 static_assert(
sizeof(t_to) <=
sizeof(t_from),
"Bad rcast conversion");
406 return *((t_to*)(&value));
409 #define UNUSED(expr) do { (void)(expr); } while (0)
412 static_assert(
sizeof(bool) == 1,
"Bad bool size");
413 static_assert(
sizeof(char) == 1,
"Bad char size");
415 static_assert(
sizeof(float) == 4,
"Bad float size");
416 static_assert(
sizeof(double) == 8,
"Bad double size");
418 static_assert(
sizeof(
fltp04) == 4,
"Bad fltp04 size");
419 static_assert(
sizeof(
fltp08) == 8,
"Bad fltp08 size");
421 static_assert(
sizeof(
uint01) == 1,
"Bad int size");
422 static_assert(
sizeof(
uint02) == 2,
"Bad int size");
423 static_assert(
sizeof(
uint04) == 4,
"Bad int size");
424 static_assert(
sizeof(
uint08) == 8,
"Bad int size");
426 static_assert(
sizeof(
sint01) == 1,
"Bad int size");
427 static_assert(
sizeof(
sint02) == 2,
"Bad int size");
428 static_assert(
sizeof(
sint04) == 4,
"Bad int size");
429 static_assert(
sizeof(
sint08) == 8,
"Bad int size");
#define lib_assert(expression, message)
Definition LibAssert.h:61
Dummy class to ensure creation of an include file around core root values.
Definition BaseValues.hpp:44
int32_t sint04
-Defines an alias representing a 4 byte, signed integer. -Can represent exact integer values -2147483...
Definition BaseValues.hpp:64
GeodeticValues
Values that represent dimension values for geodic dimensions. Represents latitude,...
Definition BaseValues.hpp:181
@ LAT
Definition BaseValues.hpp:182
@ LON
Definition BaseValues.hpp:183
@ ALT
Definition BaseValues.hpp:184
int64_t sint08
-Defines an alias representing an 8 byte, signed integer -Can represent exact integer values -9223372...
Definition BaseValues.hpp:71
LocationValues
Values that represent location values.
Definition BaseValues.hpp:195
@ MIN
Definition BaseValues.hpp:196
@ MAX
Definition BaseValues.hpp:197
wchar_t wchar
Allias for wchar_t, a value that represents a character of two bytes in size.
Definition BaseValues.hpp:155
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
InterpolationValues
Values that represent interpolation functions. Useful in large or complicated geological or time base...
Definition BaseValues.hpp:221
@ nearest_neighbor
Definition BaseValues.hpp:222
@ bicubic
Definition BaseValues.hpp:224
@ e_linear
Definition BaseValues.hpp:223
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
constexpr t_to rcast(t_from value)
Casts the given value. Is equivalent to reinterpret_cast except allows for the option of special case...
Definition BaseValues.hpp:403
IntersectionTypes
Used for classifying shape intersections.
Definition BaseValues.hpp:210
@ inside
Definition BaseValues.hpp:212
@ mixed
Definition BaseValues.hpp:213
@ outside
Definition BaseValues.hpp:211
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
DimensionValues
Values that represent dimension values.
Definition BaseValues.hpp:166
@ B
Definition BaseValues.hpp:170
@ A
Definition BaseValues.hpp:168
@ Y
Definition BaseValues.hpp:169
@ X
Definition BaseValues.hpp:167
@ C
Definition BaseValues.hpp:172
@ D
Definition BaseValues.hpp:174
@ Z
Definition BaseValues.hpp:171
@ W
Definition BaseValues.hpp:173
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233
static const t_type Invalid
Definition BaseValues.hpp:234
static const t_type Min
Definition BaseValues.hpp:235
static const t_type Max
Definition BaseValues.hpp:236