acedia::util::EndianConverter Class Reference

Converts the local endian to big endian if needed. More...

#include <acedia_util.hpp>

List of all members.

Public Member Functions

boost::int8_t operator() (boost::int8_t i) const
 Convenience function that does nothing.
boost::int16_t operator() (boost::int16_t i) const
 Convert a 16 bit integer to network byte order.
boost::int32_t operator() (boost::int32_t i) const
 Convert a 32 bit integer to network byte order.
boost::int64_t operator() (boost::int64_t i) const
 Convert a 64 bit integer to network byte order.
boost::uint8_t operator() (boost::uint8_t i) const
 Convenience function that does nothing.
boost::uint16_t operator() (boost::uint16_t i) const
 Convert a 16 bit integer to network byte order.
boost::uint32_t operator() (boost::uint32_t i) const
 Convert a 32 bit integer to network byte order.
boost::uint64_t operator() (boost::uint64_t i) const
 Convert a 64 bit integer to network byte order.

Detailed Description

Converts the local endian to big endian if needed.

The converter does nothing on big endian machines and swaps the byte order on little endian machines. It simplifies the use of the ntoh/hton function pair and adds a plattform independent conversion of 64 bit integers.

Definition at line 803 of file acedia_util.hpp.


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

Generated by  doxygen 1.6.2