Loads a 16, 32 or 64 bit value with byte swapping if needed. More...
#include <brendian.h>


Loads a 16, 32 or 64 bit value with byte swapping if needed.
This class will map to either to Burger::NativeEndian or Burger::SwapEndian depending on if this is a little endian machine or not. Use of this class will allow the programmer to write code that is endian neutral since the compiler will perform the proper mapping depending on the target's settings..
Little endian is considered true if the Word32 value 0x12345678 is stored in memory as 0x78, 0x56, 0x34, 0x12.
Examples of use:
Word32 LoadedInt; // Load 4 bytes from a file fread(fp,1,4,&LoadedInt); // Fetch the little endian data Word32 foo = Burger::LittleEndian::Load(&LoadedInt);
1.7.1