clan::Endian Class Reference - ClanLib SDK
Description: clan::Endian Class Reference

Static Public Member Functions | List of all members
clan::Endian Class Reference
clanCore I/O Data

Endianess management class. More...

`#include <cl_endian.h>`

## Static Public Member Functions
static bool | is_system_64bit ()
| Returns true if 64 bit system.
static bool | is_system_big ()
| Returns true if big endian system.
static void | swap (void *data, int type_size, int total_times=1)
| Swaps larger amounts of data between little and big endian.
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

## ◆ is_system_64bit()

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

Returns true if 64 bit system.

Returns
  True if 64 bit, false otherwise.

## ◆ is_system_big()

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().

## ◆ swap()

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

  data | Data to be swapped.
  type_size | Size of datatype to be swapped. (Must be an even number)
  total_times | Number of 'type_size' size data chunks to be swapped.

Referenced by swap_if_big(), and swap_if_little().

## ◆ swap_if_big()

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

References is_system_big(), and swap().

## ◆ swap_if_little()

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:

- cl_endian.h