#include <ByteOrder.h++>
Static Public Member Functions | |
| static uint16_t | hostToNetwork (uint16_t n) throw () |
| Convert an unsigned 16-bit integer from host to network byte-order. | |
| static uint32_t | hostToNetwork (uint32_t n) throw () |
| Convert an unsigned 32-bit integer from host to network byte-order. | |
| static uint64_t | hostToNetwork (uint64_t n) throw () |
| Convert an unsigned 64-bit integer from host to network byte-order. | |
| static uint16_t | networkToHost (uint16_t n) throw () |
| Convert an unsigned 16-bit integer from network to host byte-order. | |
| static uint32_t | networkToHost (uint32_t n) throw () |
| Convert an unsigned 32-bit integer from network to host byte-order. | |
| static uint64_t | networkToHost (uint64_t n) throw () |
| Convert an unsigned 64-bit integer from network to host byte-order. | |
| static bool | isBigEndian () throw () |
| Determine if the host system is big-endian. | |
| static bool | isLittleEndian () throw () |
| Determine if the host system is little-endian. | |
| static Endianness | getEndianness () throw () |
| Get the endianness of the host system. | |
| template<typename T > | |
| static T & | reverseBytes (T &value) throw () |
| Reverse the bytes in a value. | |
| static Endianness getEndianness | ( | ) | throw () [inline, static] |
Get the endianness of the host system.
| uint64_t hostToNetwork | ( | uint64_t | n | ) | throw () [static] |
Convert an unsigned 64-bit integer from host to network byte-order.
| static uint32_t hostToNetwork | ( | uint32_t | n | ) | throw () [inline, static] |
Convert an unsigned 32-bit integer from host to network byte-order.
| static uint16_t hostToNetwork | ( | uint16_t | n | ) | throw () [inline, static] |
Convert an unsigned 16-bit integer from host to network byte-order.
| bool isBigEndian | ( | ) | throw () [static] |
Determine if the host system is big-endian.
| static bool isLittleEndian | ( | ) | throw () [inline, static] |
Determine if the host system is little-endian.
| uint64_t networkToHost | ( | uint64_t | n | ) | throw () [static] |
Convert an unsigned 64-bit integer from network to host byte-order.
| static uint32_t networkToHost | ( | uint32_t | n | ) | throw () [inline, static] |
Convert an unsigned 32-bit integer from network to host byte-order.
| static uint16_t networkToHost | ( | uint16_t | n | ) | throw () [inline, static] |
Convert an unsigned 16-bit integer from network to host byte-order.
| static T& reverseBytes | ( | T & | value | ) | throw () [inline, static] |
Reverse the bytes in a value.
This method may be used to toggle the endianness of an arbitrary value.
| value | The value. |
1.5.9