Class CL_Endian
Endianess management class.
Contained in: global
Derived from:
none
Derived by:
none
Group: Core (I/O Data)
#include <ClanLib/core.h>
public function member index: |
Operations: |
static void | swap | (void* data, int type_size, int total_times=1); |
Attributes: |
static bool | is_system_big | (); |
static bool | is_system_64bit | (); |
|
Description:
The CL_Endian class is used to convert between different endianess. There are also a set of defines to the lazy developer:
#define SWAP_IF_BIG(i)
#define SWAP_IF_LITTLE(i)
#define SWAP_IF_BIG_ALOT(i, times)
#define SWAP_IF_LITTLE_ALOT(i, times)
#define IS_SYSTEM_64BIT()
Each of these defines call CL_Endian::is_system_big() and CL_Endian::swap.
Function Member Descriptions:
CL_Endian::is_system_64bit - Returns true if 64 bit system.
static bool is_system_64bit();
Returns - True if 64 bit, false otherwise.
CL_Endian::is_system_big - Returns true if big endian system.
static bool is_system_big();
Returns - True if big endian system, false otherwise.
CL_Endian::swap - Swaps larger amounts of data between little and big endian.
static void swap(void* data, int type_size, int total_times=1);
data -Data to be swapped.
type_size - Size of datatype to be swapped.
total_times - Number of 'type_size' size data chunks to be swapped.