33#include <NDEVR/LibAssert.h>
270 template<
class t_type>
380 template<
class t_to,
class t_from>
381 constexpr t_to
cast(t_from value)
383 return static_cast<t_to
>(value);
389 return static_cast<uint04>(value);
395 return static_cast<uint04>(value);
401 return static_cast<uint04>(value);
407 return static_cast<uint04>(value);
426 template<
class t_to,
class t_from>
429 static_assert(
sizeof(t_to) <=
sizeof(t_from),
"Bad rcast conversion");
430 return *((t_to*)(&value));
433 #define UNUSED(expr) do { (void)(expr); } while (0)
436 static_assert(
sizeof(bool) == 1,
"Bad bool size");
437 static_assert(
sizeof(char) == 1,
"Bad char size");
439 static_assert(
sizeof(float) == 4,
"Bad float size");
440 static_assert(
sizeof(double) == 8,
"Bad double size");
442 static_assert(
sizeof(
fltp04) == 4,
"Bad fltp04 size");
443 static_assert(
sizeof(
fltp08) == 8,
"Bad fltp08 size");
445 static_assert(
sizeof(
uint01) == 1,
"Bad int size");
446 static_assert(
sizeof(
uint02) == 2,
"Bad int size");
447 static_assert(
sizeof(
uint04) == 4,
"Bad int size");
448 static_assert(
sizeof(
uint08) == 8,
"Bad int size");
450 static_assert(
sizeof(
sint01) == 1,
"Bad int size");
451 static_assert(
sizeof(
sint02) == 2,
"Bad int size");
452 static_assert(
sizeof(
sint04) == 4,
"Bad int size");
453 static_assert(
sizeof(
sint08) == 8,
"Bad int size");
#define lib_assert(expression, message)
Asserts some logic in the code. Disabled in non debug mode by default. Can be re-enabled in release u...
Definition LibAssert.h:70
Dummy class to ensure creation of an include file around core root values.
Definition BaseValues.hpp:48
int32_t sint04
-Defines an alias representing a 4 byte, signed integer. -Can represent exact integer values -2147483...
Definition BaseValues.hpp:76
GeodeticValues
Definition BaseValues.hpp:211
@ LAT
Definition BaseValues.hpp:212
@ LON
Definition BaseValues.hpp:213
@ ALT
Definition BaseValues.hpp:214
int64_t sint08
-Defines an alias representing an 8 byte, signed integer -Can represent exact integer values -9223372...
Definition BaseValues.hpp:86
LocationValues
Values that represent location values. -Note these are used throughout the code to make things more r...
Definition BaseValues.hpp:225
@ MIN
Definition BaseValues.hpp:226
@ MAX
Definition BaseValues.hpp:227
wchar_t wchar
Definition BaseValues.hpp:184
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
InterpolationValues
Values that represent interpolation functions. Useful in large or complicated geological or time.
Definition BaseValues.hpp:255
@ nearest_neighbor
Definition BaseValues.hpp:256
@ bicubic
Definition BaseValues.hpp:258
@ e_linear
Definition BaseValues.hpp:257
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
int8_t sint01
-Defines an alias representing a 1 byte, signed integer. -Can represent exact integer values -127 thr...
Definition BaseValues.hpp:56
constexpr t_to rcast(t_from value)
Definition BaseValues.hpp:427
IntersectionTypes
Used for classifying shape intersections.
Definition BaseValues.hpp:241
@ inside
Definition BaseValues.hpp:243
@ mixed
Definition BaseValues.hpp:244
@ outside
Definition BaseValues.hpp:242
int16_t sint02
-Defines an alias representing a 2 byte, signed integer. -Can represent exact integer values -32767 t...
Definition BaseValues.hpp:66
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:109
DimensionValues
Values that represent dimension values.
Definition BaseValues.hpp:199
@ B
Definition BaseValues.hpp:203
@ A
Definition BaseValues.hpp:201
@ Y
Definition BaseValues.hpp:202
@ X
Definition BaseValues.hpp:200
@ C
Definition BaseValues.hpp:205
@ D
Definition BaseValues.hpp:207
@ Z
Definition BaseValues.hpp:204
@ W
Definition BaseValues.hpp:206
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition BaseValues.hpp:272
static const t_type Min
Definition BaseValues.hpp:276
static const t_type Max
Definition BaseValues.hpp:278
static const t_type NaN
Definition BaseValues.hpp:274