3.0.0
Freundlich's C++ toolkit
Typedefs | Enumerations | Functions
fcppt::endianness Namespace Reference

Functions to convert and query endianness. More...

Typedefs

typedef fcppt::endianness::raw_valueraw_pointer
 A pointer to raw memory, used to swap bytes. More...
 
typedef unsigned char raw_value
 The raw memory type used to swap bytes. More...
 
typedef std::size_t size_type
 The size of raw memory, used to swap bytes. More...
 

Enumerations

enum  format { format::little, format::big }
 An enumeration for the possible endiannesses. More...
 

Functions

template<typename Type >
Type convert (Type const &_value, fcppt::endianness::format const _format)
 Converts the endianness of an object. More...
 
FCPPT_DETAIL_SYMBOL fcppt::endianness::format host_format ()
 Returns the endianness of this machine. More...
 
FCPPT_DETAIL_SYMBOL bool is_big_endian ()
 Returns if this machine uses big endianness. More...
 
FCPPT_DETAIL_SYMBOL bool is_little_endian ()
 Returns if this machine uses little endianness. More...
 
FCPPT_DETAIL_SYMBOL void reverse_mem (fcppt::endianness::raw_pointer data, fcppt::endianness::size_type size)
 Reverses the byte order of a given memory block. More...
 
template<typename Type >
Type swap (Type _value)
 Swaps the endianness of an object. More...
 

Detailed Description

Functions to convert and query endianness.