Endianess management class. More...

#include <cl_endian.h>

Static Public Member Functions

static bool is_system_64bit ()
 Returns true if 64 bit system. More...
 
static bool is_system_big ()
 Returns true if big endian system. More...
 
static void swap (void *data, int type_size, int total_times=1)
 Swaps larger amounts of data between little and big endian. More...
 
static void swap_if_big (void *data, int type_size, int total_times=1)
 
static void swap_if_little (void *data, int type_size, int total_times=1)
 

Detailed Description

Endianess management class.

Member Function Documentation

static bool clan::Endian::is_system_64bit ( )
static

Returns true if 64 bit system.

Returns
True if 64 bit, false otherwise.
static bool clan::Endian::is_system_big ( )
static

Returns true if big endian system.

Returns
True if big endian system, false otherwise.

Referenced by swap_if_big(), and swap_if_little().

static void clan::Endian::swap ( void *  data,
int  type_size,
int  total_times = 1 
)
static

Swaps larger amounts of data between little and big endian.

Parameters
dataData to be swapped.
type_sizeSize of datatype to be swapped. (Must be an even number)
total_timesNumber of 'type_size' size data chunks to be swapped.

Referenced by swap_if_big(), and swap_if_little().

static void clan::Endian::swap_if_big ( void *  data,
int  type_size,
int  total_times = 1 
)
inlinestatic

References is_system_big(), and swap().

static void clan::Endian::swap_if_little ( void *  data,
int  type_size,
int  total_times = 1 
)
inlinestatic

References is_system_big(), and swap().


The documentation for this class was generated from the following file: