Static Public Member Functions

Burger::SwapEndian Class Reference

Swap the byte order of 16, 32 and 64 bit values. More...

#include <brendian.h>

Inheritance diagram for Burger::SwapEndian:
Inheritance graph
[legend]

List of all members.

Static Public Member Functions

static Word16 BURGER_API Load (Word16 uInput)
 Reverse the endian of a 16 bit integer.
static Word32 BURGER_API Load (Word32 uInput)
 Reverse the endian of a 32 bit integer.
static Word16 BURGER_API Load (const Word16 *pInput)
 Reverse the endian of a 16 bit integer.
static Word32 BURGER_API Load (const Word32 *pInput)
 Reverse the endian of a 32 bit integer.
static Word64 BURGER_API Load (Word64 uInput)
 Reverse the endian of a 64 bit integer.
static Word64 BURGER_API Load (const Word64 *pInput)
 Reverse the endian of a 64-bit integer.
static float BURGER_API Load (float fInput)
 Reverse the endian of a 32-bit float.
static double BURGER_API Load (double dInput)
 Reverse the endian of a 64-bit float.
static float BURGER_API Load (const float *pInput)
 Reverse the endian of a 32-bit float.
static double BURGER_API Load (const double *pInput)
 Reverse the endian of a 64-bit float.
static Word16 BURGER_API LoadAny (const Word16 *pInput)
 Fetch a 16 bit unsigned reverse endian integer from memory with byte alignment.
static Word32 BURGER_API LoadAny (const Word32 *pInput)
 Fetch a 32 bit unsigned reverse endian integer from memory with byte alignment.
static Word64 BURGER_API LoadAny (const Word64 *pInput)
 Fetch a 64 bit unsigned reverse endian integer from memory with byte alignment.
static float BURGER_API LoadAny (const float *pInput)
 Fetch a 32 bit reverse endian float from memory with byte alignment.
static double BURGER_API LoadAny (const double *pInput)
 Fetch a 64 bit reverse endian float from memory with byte alignment.
static void BURGER_INLINE Fixup (Word16 *pInput)
 Reverse the endian of a 16-bit value.
static void BURGER_INLINE Fixup (Word32 *pInput)
 Reverse the endian of a 32-bit value.
static void BURGER_API Fixup (Word64 *pInput)
 Reverse the endian of a 64-bit value.
static void BURGER_API FixupAny (Word16 *pInput)
 Reverse the endian of a 16-bit value.
static void BURGER_API FixupAny (Word32 *pInput)
 Reverse the endian of a 32-bit value.
static void BURGER_API FixupAny (Word64 *pInput)
 Reverse the endian of a 64-bit value.
static BURGER_INLINE Int16 Load (Int16 iInput)
 Reverse the endian of a 16 bit signed integer.
static BURGER_INLINE Int32 Load (Int32 iInput)
 Reverse the endian of a 32 bit signed integer.
static BURGER_INLINE Int64 Load (Int64 iInput)
 Reverse the endian of a 64 bit signed integer.
static BURGER_INLINE Word Load (Word uInput)
 Reverse the endian of a 32 bit unsigned integer.
static BURGER_INLINE Int Load (Int iInput)
 Reverse the endian of a 32 bit signed integer.
static BURGER_INLINE Word Load (const Word *pInput)
 Reverse the endian of a 32 bit unsigned integer.
static BURGER_INLINE Int Load (const Int *pInput)
 Reverse the endian of a 32 bit signed integer.
static BURGER_INLINE Word LoadAny (const Word *pInput)
 Reverse the endian of a 32 bit unsigned integer with byte alignment.
static BURGER_INLINE Int LoadAny (const Int *pInput)
 Reverse the endian of a 32 bit signed integer with byte alignment.
static BURGER_INLINE void Fixup (Word *pInput)
 Reverse the endian of a 32-bit value.
static BURGER_INLINE void Fixup (Int *pInput)
 Reverse the endian of a 32-bit value.
static BURGER_INLINE void FixupAny (Word *pInput)
 Reverse the endian of a 32-bit value with byte alignment.
static BURGER_INLINE void FixupAny (Int *pInput)
 Reverse the endian of a 32-bit value with byte alignment.
static BURGER_INLINE Int16 Load (const Int16 *pInput)
 Reverse the endian of a 16 bit signed integer.
static BURGER_INLINE Int32 Load (const Int32 *pInput)
 Reverse the endian of a 32 bit signed integer.
static BURGER_INLINE Int64 Load (const Int64 *pInput)
 Reverse the endian of a 64 bit signed integer.
static BURGER_INLINE Int16 LoadAny (const Int16 *pInput)
 Reverse the endian of a 16 bit signed integer with byte alignment.
static BURGER_INLINE Int32 LoadAny (const Int32 *pInput)
 Reverse the endian of a 32 bit signed integer with byte alignment.
static BURGER_INLINE Int64 LoadAny (const Int64 *pInput)
 Reverse the endian of a 64 bit signed integer with byte alignment.
static BURGER_INLINE void Fixup (Int16 *pInput)
 Reverse the endian of a 16-bit value.
static BURGER_INLINE void Fixup (Int32 *pInput)
 Reverse the endian of a 32-bit value.
static BURGER_INLINE void Fixup (Int64 *pInput)
 Reverse the endian of a 64-bit value.
static BURGER_INLINE void Fixup (float *pInput)
 Reverse the endian of a 32-bit float value.
static BURGER_INLINE void Fixup (double *pInput)
 Reverse the endian of a 64-bit float value.
static BURGER_INLINE void FixupAny (Int16 *pInput)
 Reverse the endian of a 16-bit value with byte alignment.
static BURGER_INLINE void FixupAny (Int32 *pInput)
 Reverse the endian of a 32-bit value with byte alignment.
static BURGER_INLINE void FixupAny (Int64 *pInput)
 Reverse the endian of a 64-bit value with byte alignment.
static BURGER_INLINE void FixupAny (float *pInput)
 Reverse the endian of a 32-bit float value with byte alignment.
static BURGER_INLINE void FixupAny (double *pInput)
 Reverse the endian of a 64-bit float value with byte alignment.

Detailed Description

Swap the byte order of 16, 32 and 64 bit values.

When reading data from machines that are using different microprocessors, the byte order could be reversed. These functions will swap the byte order.

Note:
These functions will always swap the bytes, use Burger::LittleEndian or Burger::BigEndian to let the compiler determine whether byte swapping is needed.
See also:
Burger::NativeEndian, Burger::LittleEndian and Burger::BigEndian

Member Function Documentation

Burger::SwapEndian::Fixup ( Word16 pInput  )  [inline, static]

Reverse the endian of a 16-bit value.

Given a pointer to a 16-bit value in memory, load it and swap the bytes so that 0x1234 becomes 0x3412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::FixupAny(Word16 *) or Burger::NativeEndian::Fixup(Word16 *)
Burger::SwapEndian::Fixup ( Word32 pInput  )  [inline, static]

Reverse the endian of a 32-bit value.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::FixupAny(Word32 *) or Burger::NativeEndian::Fixup(Word32 *)
void BURGER_API Burger::SwapEndian::Fixup ( Word64 pInput  )  [static]

Reverse the endian of a 64-bit value.

Given a pointer to a 64-bit value in memory, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::FixupAny(Word64 *) or Burger::NativeEndian::Fixup(Word64 *)
Burger::SwapEndian::Fixup ( Int pInput  )  [inline, static]

Reverse the endian of a 32-bit value.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Fixup(Word32 *).
See also:
Burger::SwapEndian::Fixup(Word32 *)
Burger::SwapEndian::Fixup ( Int16 pInput  )  [inline, static]

Reverse the endian of a 16-bit value.

Given a pointer to a 16-bit value in memory, load it and swap the bytes so that 0x1234 becomes 0x3412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Fixup(Word16 *).
See also:
Burger::SwapEndian::Fixup(Word16 *)
Burger::SwapEndian::Fixup ( Int32 pInput  )  [inline, static]

Reverse the endian of a 32-bit value.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Fixup(Word32 *).
See also:
Burger::SwapEndian::Fixup(Word32 *)
Burger::SwapEndian::Fixup ( Int64 pInput  )  [inline, static]

Reverse the endian of a 64-bit value.

Given a pointer to a 64-bit value in memory, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Fixup(Word64 *).
See also:
Burger::SwapEndian::Fixup(Word64 *)
Burger::SwapEndian::Fixup ( float *  pInput  )  [inline, static]

Reverse the endian of a 32-bit float value.

Given a pointer to a 32-bit float value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Fixup(Word32 *).
See also:
Burger::SwapEndian::Fixup(Word32 *)
Burger::SwapEndian::Fixup ( double *  pInput  )  [inline, static]

Reverse the endian of a 64-bit float value.

Given a pointer to a 64-bit value in memory, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Fixup(Word64 *).
See also:
Burger::SwapEndian::Fixup(Word64 *)
Burger::SwapEndian::Fixup ( Word pInput  )  [inline, static]

Reverse the endian of a 32-bit value.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Fixup(Word32 *).
See also:
Burger::SwapEndian::Fixup(Word32 *)
Burger::SwapEndian::FixupAny ( Word pInput  )  [inline, static]

Reverse the endian of a 32-bit value with byte alignment.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::FixupAny(Word32 *).
See also:
Burger::SwapEndian::FixupAny(Word32 *)
Burger::SwapEndian::FixupAny ( Int pInput  )  [inline, static]

Reverse the endian of a 32-bit value with byte alignment.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::FixupAny(Word32 *).
See also:
Burger::SwapEndian::FixupAny(Word32 *)
void BURGER_API Burger::SwapEndian::FixupAny ( Word16 pInput  )  [static]

Reverse the endian of a 16-bit value.

Given a pointer to a 16-bit value in memory, load it and swap the bytes so that 0x1234 becomes 0x3412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Fixup(Word16 *) or Burger::NativeEndian::FixupAny(Word16 *)
Burger::SwapEndian::FixupAny ( Int32 pInput  )  [inline, static]

Reverse the endian of a 32-bit value with byte alignment.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::FixupAny(Word32 *).
See also:
Burger::SwapEndian::FixupAny(Word32 *)
void BURGER_API Burger::SwapEndian::FixupAny ( Word64 pInput  )  [static]

Reverse the endian of a 64-bit value.

Given a pointer to a 64-bit value in memory, load it and swap the bytes so that 0x123456789aBCDEF0 becomes 0xF0DEBC9A78563412. The pointer does not have to be 64-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Fixup(Word64 *) or Burger::NativeEndian::FixupAny(Word64 *)
void BURGER_API Burger::SwapEndian::FixupAny ( Word32 pInput  )  [static]

Reverse the endian of a 32-bit value.

Given a pointer to a 32-bit value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Fixup(Word32 *) or Burger::NativeEndian::FixupAny(Word32 *)
Burger::SwapEndian::FixupAny ( Int16 pInput  )  [inline, static]

Reverse the endian of a 16-bit value with byte alignment.

Given a pointer to a 16-bit value in memory, load it and swap the bytes so that 0x1234 becomes 0x3412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::FixupAny(Word16 *).
See also:
Burger::SwapEndian::FixupAny(Word16 *)
Burger::SwapEndian::FixupAny ( Int64 pInput  )  [inline, static]

Reverse the endian of a 64-bit value with byte alignment.

Given a pointer to a 64-bit value in memory, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::FixupAny(Word64 *).
See also:
Burger::SwapEndian::FixupAny(Word64 *)
Burger::SwapEndian::FixupAny ( float *  pInput  )  [inline, static]

Reverse the endian of a 32-bit float value with byte alignment.

Given a pointer to a 32-bit float value in memory, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::FixupAny(Word32 *).
See also:
Burger::SwapEndian::FixupAny(Word32 *)
Burger::SwapEndian::FixupAny ( double *  pInput  )  [inline, static]

Reverse the endian of a 64-bit float value with byte alignment.

Given a pointer to a 64-bit value in memory, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::FixupAny(Word64 *).
See also:
Burger::SwapEndian::FixupAny(Word64 *)
Burger::SwapEndian::Load ( const Int16 pInput  )  [inline, static]

Reverse the endian of a 16 bit signed integer.

Given a pointer to a 16 bit value, load it and swap the bytes so that 0x1234 becomes 0x3412

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Load(const Word16 *).
See also:
Burger::SwapEndian::Load(const Word16*)
Burger::SwapEndian::Load ( Word  uInput  )  [inline, static]

Reverse the endian of a 32 bit unsigned integer.

Given a 32 bit value in an integer register, swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
uInput = Value to endian convert
Returns:
The input with the bytes swapped, no errors are possible.
Note:
This function is inlined to actually use Burger::SwapEndian::Load(Word32).
See also:
Burger::SwapEndian::Load(Word32)
double BURGER_API Burger::SwapEndian::Load ( double  dInput  )  [static]

Reverse the endian of a 64-bit float.

Given a 64-bit floating point value, swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412

Parameters:
dInput Value to endian convert
Returns:
The value with the bytes swapped, no errors are possible.
Note:
Use of this form is discouraged since it involves moving a floating point value into an integer register and back again. Use the const double * version instead.
See also:
Burger::NativeEndian::Load(double) or Burger::SwapEndian::Load(const double *)
Word32 BURGER_API Burger::SwapEndian::Load ( Word32  uInput  )  [static]

Reverse the endian of a 32 bit integer.

Given a 32 bit value in an integer register, swap the bytes so that 0x12345678 becomes 0x78563412

Parameters:
uInput Value to endian convert
Returns:
The input with the bytes swapped, no errors are possible.
See also:
Burger::NativeEndian::Load(Word32), Burger::SwapEndian::Load(Int32) or Burger::SwapEndian::Load(const Word32 *)
Burger::SwapEndian::Load ( const Word pInput  )  [inline, static]

Reverse the endian of a 32 bit unsigned integer.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Load(const Word32 *).
See also:
Burger::SwapEndian::Load(const Word32*)
Burger::SwapEndian::Load ( Int64  iInput  )  [inline, static]

Reverse the endian of a 64 bit signed integer.

Given a 32 bit value in an integer register, swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412.

Parameters:
iInput = Value to endian convert
Returns:
The input with the bytes swapped, no errors are possible.
Note:
This function is inlined to actually use Burger::SwapEndian::Load(Word64).
See also:
Burger::SwapEndian::Load(Word64)
float BURGER_API Burger::SwapEndian::Load ( const float *  pInput  )  [static]

Reverse the endian of a 32-bit float.

Given a pointer to a 32-bit floating point value, load it and swap the bytes so that 0x12345678 becomes 0x78563412

Parameters:
pInput Pointer to the value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(float) or Burger::NativeEndian::Load(const float *)
Burger::SwapEndian::Load ( const Int32 pInput  )  [inline, static]

Reverse the endian of a 32 bit signed integer.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Load(const Word32 *).
See also:
Burger::SwapEndian::Load(const Word32*)
Burger::SwapEndian::Load ( Int16  iInput  )  [inline, static]

Reverse the endian of a 16 bit signed integer.

Given a 16 bit value in an integer register, swap the bytes so that 0x1234 becomes 0x3412.

Parameters:
iInput = Value to endian convert
Returns:
The input with the bytes swapped, no errors are possible.
Note:
This function is inlined to actually use Burger::SwapEndian::Load(Word16).
See also:
Burger::SwapEndian::Load(Word16)
Burger::SwapEndian::Load ( Int32  iInput  )  [inline, static]

Reverse the endian of a 32 bit signed integer.

Given a 32 bit value in an integer register, swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
iInput = Value to endian convert
Returns:
The input with the bytes swapped, no errors are possible.
Note:
This function is inlined to actually use Burger::SwapEndian::Load(Word32).
See also:
Burger::SwapEndian::Load(Word32)
Word16 BURGER_API Burger::SwapEndian::Load ( Word16  uInput  )  [static]

Reverse the endian of a 16 bit integer.

Given a 16 bit value in an integer register, swap the bytes so that 0x1234 becomes 0x3412

Parameters:
uInput Value to endian convert
Returns:
The input with the bytes swapped, no errors are possible.
See also:
Burger::NativeEndian::Load(Word16), Burger::SwapEndian::Load(Int16) or Burger::SwapEndian::Load(const Word16 *)
double BURGER_API Burger::SwapEndian::Load ( const double *  pInput  )  [static]

Reverse the endian of a 64-bit float.

Given a pointer to a 64-bit floating point value, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412

Parameters:
pInput Pointer to the value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(double) or Burger::NativeEndian::Load(const double *)
Burger::SwapEndian::Load ( const Int64 pInput  )  [inline, static]

Reverse the endian of a 64 bit signed integer.

Given a pointer to a 64 bit value, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Load(const Word64 *).
See also:
Burger::SwapEndian::Load(const Word64*)
Word32 BURGER_API Burger::SwapEndian::Load ( const Word32 pInput  )  [static]

Reverse the endian of a 32 bit integer.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412

Parameters:
pInput Pointer to value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::NativeEndian::Load(Word32), Burger::SwapEndian::Load(Int32) or Burger::SwapEndian::Load(Word32)
Word64 BURGER_API Burger::SwapEndian::Load ( const Word64 pInput  )  [static]

Reverse the endian of a 64-bit integer.

Given a pointer to a 64-bit value, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412

Parameters:
pInput Pointer to the value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(Word64) or Burger::NativeEndian::Load(const Word64 *)
Word64 BURGER_API Burger::SwapEndian::Load ( Word64  uInput  )  [static]

Reverse the endian of a 64 bit integer.

Given a 64 bit value, swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412

Parameters:
uInput Value to endian convert
Returns:
The value with the bytes swapped, no errors are possible.
See also:
Burger::NativeEndian::Load(Word64), Burger::SwapEndian::Load(Int64) or Burger::SwapEndian::Load(const Word64 *)
float BURGER_API Burger::SwapEndian::Load ( float  fInput  )  [static]

Reverse the endian of a 32-bit float.

Given a 32-bit floating point value, swap the bytes so that 0x12345678 becomes 0x78563412

Parameters:
fInput Value to endian convert
Returns:
The value with the bytes swapped, no errors are possible.
Note:
Use of this form is discouraged since it involves moving a floating point value into an integer register and back again. Use the const float * version instead.
See also:
Burger::NativeEndian::Load(float) or Burger::SwapEndian::Load(const float *)
Burger::SwapEndian::Load ( const Int pInput  )  [inline, static]

Reverse the endian of a 32 bit signed integer.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::Load(const Word32 *).
See also:
Burger::SwapEndian::Load(const Word32*)
Burger::SwapEndian::Load ( Int  iInput  )  [inline, static]

Reverse the endian of a 32 bit signed integer.

Given a 32 bit value in an integer register, swap the bytes so that 0x12345678 becomes 0x78563412.

Parameters:
iInput = Value to endian convert
Returns:
The input with the bytes swapped, no errors are possible.
Note:
This function is inlined to actually use Burger::SwapEndian::Load(Word32).
See also:
Burger::SwapEndian::Load(Word32)
Word16 BURGER_API Burger::SwapEndian::Load ( const Word16 pInput  )  [static]

Reverse the endian of a 16 bit integer.

Given a pointer to a 16 bit value, load it and swap the bytes so that 0x1234 becomes 0x3412

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::NativeEndian::Load(Word16), Burger::SwapEndian::Load(Int16) or Burger::SwapEndian::Load(Word16)
Burger::SwapEndian::LoadAny ( const Int32 pInput  )  [inline, static]

Reverse the endian of a 32 bit signed integer with byte alignment.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::LoadAny(const Word32 *).
See also:
Burger::SwapEndian::LoadAny(const Word32*)
Word16 BURGER_API Burger::SwapEndian::LoadAny ( const Word16 pInput  )  [static]

Fetch a 16 bit unsigned reverse endian integer from memory with byte alignment.

Given a pointer to a 16 bit value, load it and swap the bytes so that 0x1234 becomes 0x3412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(const Word16 *) or Burger::NativeEndian::LoadAny(const Word16 *)
Word32 BURGER_API Burger::SwapEndian::LoadAny ( const Word32 pInput  )  [static]

Fetch a 32 bit unsigned reverse endian integer from memory with byte alignment.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(const Word32 *) or Burger::NativeEndian::LoadAny(const Word32 *)
Burger::SwapEndian::LoadAny ( const Word pInput  )  [inline, static]

Reverse the endian of a 32 bit unsigned integer with byte alignment.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::LoadAny(const Word32 *).
See also:
Burger::SwapEndian::LoadAny(const Word32*)
Burger::SwapEndian::LoadAny ( const Int pInput  )  [inline, static]

Reverse the endian of a 32 bit signed integer with byte alignment.

Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::LoadAny(const Word32 *).
See also:
Burger::SwapEndian::LoadAny(const Word32*)
double BURGER_API Burger::SwapEndian::LoadAny ( const double *  pInput  )  [static]

Fetch a 64 bit reverse endian float from memory with byte alignment.

Given a pointer to a 64-bit floating point value, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412. The pointer does not have to be 64-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(double) or Burger::NativeEndian::Load(const double *)
Burger::SwapEndian::LoadAny ( const Int16 pInput  )  [inline, static]

Reverse the endian of a 16 bit signed integer with byte alignment.

Given a pointer to a 16 bit value, load it and swap the bytes so that 0x1234 becomes 0x3412. The pointer does not have to be 16-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::LoadAny(const Word16 *).
See also:
Burger::SwapEndian::LoadAny(const Word16*)
Burger::SwapEndian::LoadAny ( const Int64 pInput  )  [inline, static]

Reverse the endian of a 64 bit signed integer with byte alignment.

Given a pointer to a 64 bit value, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412. The pointer does not have to be 64-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to a value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
This function is inlined to actually use Burger::SwapEndian::LoadAny(const Word64 *).
See also:
Burger::SwapEndian::LoadAny(const Word64*)
float BURGER_API Burger::SwapEndian::LoadAny ( const float *  pInput  )  [static]

Fetch a 32 bit reverse endian float from memory with byte alignment.

Given a pointer to a 32-bit floating point value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to the value to endian convert
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(float) or Burger::NativeEndian::Load(const float *)
Word64 BURGER_API Burger::SwapEndian::LoadAny ( const Word64 pInput  )  [static]

Fetch a 64 bit unsigned reverse endian integer from memory with byte alignment.

Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 64 bit value in reverse endian. The pointer does not have to be 64-bit aligned. Word8 alignment is acceptable.

Parameters:
pInput Pointer to a 64 bit value.
Returns:
The value with the bytes swapped.
Note:
NULL pointers are illegal and will page fault.
See also:
Burger::SwapEndian::Load(const Word64 *) or Burger::NativeEndian::LoadAny(const Word64 *)