![]() |
XII Release 0.1.0
|
Collection of helper methods when working with endianess "problems". More...
#include <EndianHelper.h>
Static Public Member Functions | |
static bool | IsBigEndian () |
Returns true if called on a big endian system, false otherwise. | |
static bool | IsLittleEndian () |
Returns true if called on a little endian system, false otherwise. | |
static void | SwitchWords (xiiUInt16 *pWords, xiiUInt32 uiCount) |
Switches endianess of the given array of words (16 bit values). | |
static void | SwitchDWords (xiiUInt32 *pDWords, xiiUInt32 uiCount) |
Switches endianess of the given array of double words (32 bit values). | |
static void | SwitchQWords (xiiUInt64 *pQWords, xiiUInt32 uiCount) |
Switches endianess of the given array of quad words (64 bit values). | |
static XII_ALWAYS_INLINE xiiUInt16 | Switch (xiiUInt16 uiWord) |
Returns a single switched word (16 bit value). | |
static XII_ALWAYS_INLINE xiiUInt32 | Switch (xiiUInt32 uiDWord) |
Returns a single switched double word (32 bit value). | |
static XII_ALWAYS_INLINE xiiUInt64 | Switch (xiiUInt64 uiQWord) |
Returns a single switched quad word (64 bit value). | |
template<typename T> | |
static void | SwitchInPlace (T *pValue) |
Switches a value in place (template accepts pointers for 2, 4 & 8 byte data types) | |
static void | SwitchStruct (void *pDataPointer, const char *szFormat) |
Switches a given struct according to the layout described in the szFormat parameter. | |
template<typename T> | |
static void | SwitchStruct (T *pDataPointer, const char *szFormat) |
Templated helper method for SwitchStruct. | |
static void | SwitchStructs (void *pDataPointer, const char *szFormat, xiiUInt32 uiStride, xiiUInt32 uiCount) |
Switches a given set of struct according to the layout described in the szFormat parameter. | |
template<typename T> | |
static void | SwitchStructs (T *pDataPointer, const char *szFormat, xiiUInt32 uiCount) |
Templated helper method for SwitchStructs. | |
Collection of helper methods when working with endianess "problems".
|
inlinestatic |
Returns true if called on a big endian system, false otherwise.
|
inlinestatic |
Returns true if called on a little endian system, false otherwise.
|
static |
Switches a given struct according to the layout described in the szFormat parameter.
The format string may contain the characters:
|
static |
Switches a given set of struct according to the layout described in the szFormat parameter.
The format string may contain the characters: