9 #ifndef CPPCOMMON_UTILITY_ENDIAN_H
10 #define CPPCOMMON_UTILITY_ENDIAN_H
45 static size_t ReadBigEndian(
const void* buffer, int16_t& value);
52 static size_t ReadBigEndian(
const void* buffer, uint16_t& value);
59 static size_t ReadBigEndian(
const void* buffer, int32_t& value);
66 static size_t ReadBigEndian(
const void* buffer, uint32_t& value);
73 static size_t ReadBigEndian(
const void* buffer, int64_t& value);
80 static size_t ReadBigEndian(
const void* buffer, uint64_t& value);
Big/Little-endian utilities.
static size_t ReadLittleEndian(const void *buffer, int16_t &value)
Read little-endian signed 16-bit integer value from the given buffer.
static size_t WriteBigEndian(void *buffer, int16_t value)
Write big-endian signed 16-bit integer value into the given buffer.
static bool IsLittleEndian()
Is little-endian system?
static size_t ReadBigEndian(const void *buffer, int16_t &value)
Read big-endian signed 16-bit integer value from the given buffer.
Endian & operator=(Endian &&)=delete
static size_t WriteLittleEndian(void *buffer, int16_t value)
Write little-endian signed 16-bit integer value into the given buffer.
static bool IsBigEndian()
Is big-endian system?
Endian & operator=(const Endian &)=delete
Endian(const Endian &)=delete
Big/Little-endian utilities inline implementation.
C++ Common project definitions.