Provide byte-order manipulation macros.
More...
Go to the source code of this file.
Detailed Description
Define Documentation
#define BSLS_BYTEORDER_NTOH |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes(x) |
#define BSLS_BYTEORDER_NTOHS |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes16(x) |
#define BSLS_BYTEORDER_NTOHL |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes32(x) |
#define BSLS_BYTEORDER_NTOHLL |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes64(x) |
#define BSLS_BYTEORDER_HTON |
( |
|
x |
) |
BSLS_BYTEORDER_NTOH(x) |
#define BSLS_BYTEORDER_HTONS |
( |
|
x |
) |
BSLS_BYTEORDER_NTOHS(x) |
#define BSLS_BYTEORDER_HTONL |
( |
|
x |
) |
BSLS_BYTEORDER_NTOHL(x) |
#define BSLS_BYTEORDER_HTONLL |
( |
|
x |
) |
BSLS_BYTEORDER_NTOHLL(x) |
#define BSLS_BYTEORDER_NTOHS_CONSTANT |
( |
|
x |
) |
|
Value:static_cast<unsigned short>( \
(static_cast<unsigned short>(x) >> 8) | \
(static_cast<unsigned short>(x) << 8))
#define BSLS_BYTEORDER_NTOHL_CONSTANT_NO_MSB |
( |
|
x |
) |
|
Value:((((x) >> 24) & 0x000000FF) | (((x) & 0x00FF0000) >> 8) \
| (((x) & 0x0000FF00) << 8) | (((x) & 0x0000007F) << 24))
#define BSLS_BYTEORDER_NTOHL_CONSTANT |
( |
|
x |
) |
|
#define BSLS_BYTEORDER_NTOHLL_CONSTANT_NO_MSB |
( |
|
x |
) |
|
Value: ((((x) & 0x000000000000007FLL) << 56) \
| (((x) & 0x000000000000FF00LL) << 40) \
| (((x) & 0x0000000000FF0000LL) << 24) \
| (((x) & 0x00000000FF000000LL) << 8) \
| (((x) & 0x000000FF00000000LL) >> 8) \
| (((x) & 0x0000FF0000000000LL) >> 24) \
| (((x) & 0x00FF000000000000LL) >> 40) \
| (((x) >> 56) & 0x00000000000000FFLL))
#define BSLS_BYTEORDER_NTOHLL_CONSTANT |
( |
|
x |
) |
|
#define BSLS_BYTEORDER_HTONS_CONSTANT |
( |
|
x |
) |
BSLS_BYTEORDER_NTOHS_CONSTANT(x) |
#define BSLS_BYTEORDER_HTONL_CONSTANT |
( |
|
x |
) |
BSLS_BYTEORDER_NTOHL_CONSTANT(x) |
#define BSLS_BYTEORDER_HTONLL_CONSTANT |
( |
|
x |
) |
BSLS_BYTEORDER_NTOHLL_CONSTANT(x) |
#define BSLS_BYTEORDER_LE_U16_TO_HOST |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes16(x) |
#define BSLS_BYTEORDER_LE_U32_TO_HOST |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes32(x) |
#define BSLS_BYTEORDER_LE_U64_TO_HOST |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes64(x) |
#define BSLS_BYTEORDER_HOST_U16_TO_LE |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes16(x) |
#define BSLS_BYTEORDER_HOST_U32_TO_LE |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes32(x) |
#define BSLS_BYTEORDER_HOST_U64_TO_LE |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes64(x) |
#define BSLS_BYTEORDER_BE_U16_TO_HOST |
( |
|
x |
) |
(x) |
#define BSLS_BYTEORDER_BE_U32_TO_HOST |
( |
|
x |
) |
(x) |
#define BSLS_BYTEORDER_BE_U64_TO_HOST |
( |
|
x |
) |
(x) |
#define BSLS_BYTEORDER_HOST_U16_TO_BE |
( |
|
x |
) |
(x) |
#define BSLS_BYTEORDER_HOST_U32_TO_BE |
( |
|
x |
) |
(x) |
#define BSLS_BYTEORDER_HOST_U64_TO_BE |
( |
|
x |
) |
(x) |
#define BSLS_BYTEORDER_LE_TO_HOST |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes(x) |
#define BSLS_BYTEORDER_HOST_TO_LE |
( |
|
x |
) |
BloombergLP::bsls::ByteOrderUtil::swapBytes(x) |
#define BSLS_BYTEORDER_BE_TO_HOST |
( |
|
x |
) |
(x) |
#define BSLS_BYTEORDER_HOST_TO_BE |
( |
|
x |
) |
(x) |