Converts the local endian to big endian if needed. More...
#include <acedia_util.hpp>
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. |
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.