![]() |
Plasma Engine
2.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 (plUInt16 *pWords, plUInt32 uiCount) |
Switches endianess of the given array of words (16 bit values). | |
static void | SwitchDWords (plUInt32 *pDWords, plUInt32 uiCount) |
Switches endianess of the given array of double words (32 bit values). | |
static void | SwitchQWords (plUInt64 *pQWords, plUInt32 uiCount) |
Switches endianess of the given array of quad words (64 bit values). | |
static PL_ALWAYS_INLINE plUInt16 | Switch (plUInt16 uiWord) |
Returns a single switched word (16 bit value). | |
static PL_ALWAYS_INLINE plUInt32 | Switch (plUInt32 uiDWord) |
Returns a single switched double word (32 bit value). | |
static PL_ALWAYS_INLINE plUInt64 | Switch (plUInt64 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, plUInt32 uiStride, plUInt32 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, plUInt32 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: