8 #ifndef FACEBOOK_NETWORK_DATA_H
9 #define FACEBOOK_NETWORK_DATA_H
23 class OCEAN_NETWORK_EXPORT
Data
48 static inline int toBigEndian(
const int32_t value);
56 static inline uint32_t toBigEndian(
const uint32_t value);
64 static inline int16_t toBigEndian(
const int16_t value);
72 static inline uint16_t toBigEndian(
const uint16_t value);
80 static inline int32_t fromBigEndian(
const int32_t value);
88 static inline uint32_t fromBigEndian(
const uint32_t value);
96 static inline int16_t fromBigEndian(
const int16_t value);
104 static inline uint16_t fromBigEndian(
const uint16_t value);
114 #ifdef OCEAN_LITTLE_ENDIAN
115 return (value >> 24u) | ((value >> 8u) & 0xFF00u) | ((value << 8u) & 0xFF0000u) | (value << 24u);
128 #ifdef OCEAN_LITTLE_ENDIAN
129 return uint16_t((value >> 8u) | (value << 8u));
142 #ifdef OCEAN_LITTLE_ENDIAN
143 return (value >> 24u) | ((value >> 8u) & 0xFF00u) | ((value << 8u) & 0xFF0000u) | (value << 24u);
156 #ifdef OCEAN_LITTLE_ENDIAN
157 return uint16_t((value >> 8u) | (value << 8u));
This class provides function handling different network data.
Definition: Data.h:24
static int toBigEndian(const int32_t value)
Returns a value in big-endian order given in local system bit order.
Definition: Data.h:107
OrderType
Definition of different order types.
Definition: Data.h:31
@ TYPE_BIG_ENDIAN
Big endian type.
Definition: Data.h:33
@ TYPE_LITTLE_ENDIAN
Little endian type.
Definition: Data.h:35
static int32_t fromBigEndian(const int32_t value)
Returns a value in local system bit order given as big-endian bit order.
Definition: Data.h:135
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15