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 big 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..
Big endian is considered true if the Word32 value 0x12345678 is stored in memory as 0x12, 0x34, 0x56, 0x78.
Examples of use:
Word32 LoadedInt; // Load 4 bytes from a file fread(fp,1,4,&LoadedInt); // Fetch the big endian data Word32 foo = Burger::BigEndian::Load(&LoadedInt);
1.7.1