C++ Utilities 5.27.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
Encapsulates binary conversion functions using the big endian byte order. More...
Functions | |
CPP_UTILITIES_EXPORT constexpr std::int16_t | toInt16 (const char *value) |
Returns a 16-bit signed integer converted from two bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT constexpr std::uint16_t | toUInt16 (const char *value) |
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT constexpr std::int32_t | toInt32 (const char *value) |
Returns a 32-bit signed integer converted from four bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT constexpr std::uint32_t | toUInt24 (const char *value) |
Returns a 32-bit unsigned integer converted from three bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT constexpr std::uint32_t | toUInt32 (const char *value) |
Returns a 32-bit unsigned integer converted from four bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT constexpr std::int64_t | toInt64 (const char *value) |
Returns a 64-bit signed integer converted from eight bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT constexpr std::uint64_t | toUInt64 (const char *value) |
Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT float | toFloat32 (const char *value) |
Returns a 32-bit floating point number converted from four bytes at a specified position in a char array. | |
CPP_UTILITIES_EXPORT double | toFloat64 (const char *value) |
Returns a 64-bit floating point number converted from eight bytes at a specified position in a char array. | |
template<class T , Traits::EnableIf< std::is_integral< T > > * = nullptr> | |
CPP_UTILITIES_EXPORT T | toInt (const char *value) |
Returns the specified (unsigned) integer converted from the specified char array. | |
CPP_UTILITIES_EXPORT void | getBytes24 (std::uint32_t value, char *outputbuffer) |
Stores the specified 24-bit unsigned integer value at a specified position in a char array. | |
template<class T , Traits::EnableIf< std::is_integral< T > > * = nullptr> | |
CPP_UTILITIES_EXPORT void | getBytes (T value, char *outputbuffer) |
Stores the specified (unsigned) integer value in a char array. | |
CPP_UTILITIES_EXPORT void | getBytes (float value, char *outputbuffer) |
Stores the specified 32-bit floating point value at a specified position in a char array. | |
CPP_UTILITIES_EXPORT void | getBytes (double value, char *outputbuffer) |
Stores the specified 64-bit floating point value at a specified position in a char array. | |
Encapsulates binary conversion functions using the big endian byte order.
|
inline |
Stores the specified 64-bit floating point value at a specified position in a char array.
Definition at line 208 of file binaryconversion.h.
|
inline |
Stores the specified 32-bit floating point value at a specified position in a char array.
Definition at line 198 of file binaryconversion.h.
|
inline |
Stores the specified (unsigned) integer value in a char array.
Definition at line 187 of file binaryconversion.h.
|
inline |
Stores the specified 24-bit unsigned integer value at a specified position in a char array.
Definition at line 167 of file binaryconversion.h.
|
inline |
Returns a 32-bit floating point number converted from four bytes at a specified position in a char array.
Definition at line 128 of file binaryconversion.h.
|
inline |
Returns a 64-bit floating point number converted from eight bytes at a specified position in a char array.
Definition at line 138 of file binaryconversion.h.
|
inline |
Returns the specified (unsigned) integer converted from the specified char array.
Definition at line 153 of file binaryconversion.h.
|
constexpr |
Returns a 16-bit signed integer converted from two bytes at a specified position in a char array.
Definition at line 24 of file binaryconversion.h.
|
constexpr |
Returns a 32-bit signed integer converted from four bytes at a specified position in a char array.
Definition at line 48 of file binaryconversion.h.
|
constexpr |
Returns a 64-bit signed integer converted from eight bytes at a specified position in a char array.
Definition at line 92 of file binaryconversion.h.
|
constexpr |
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a char array.
Definition at line 36 of file binaryconversion.h.
|
constexpr |
Returns a 32-bit unsigned integer converted from three bytes at a specified position in a char array.
Definition at line 64 of file binaryconversion.h.
|
constexpr |
Returns a 32-bit unsigned integer converted from four bytes at a specified position in a char array.
Definition at line 78 of file binaryconversion.h.
|
constexpr |
Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a char array.
Definition at line 110 of file binaryconversion.h.