CppCommon
1.0.4.1
C++ Common Library
|
Big/Little-endian utilities. More...
#include <endian.h>
Public Member Functions | |
Endian ()=delete | |
Endian (const Endian &)=delete | |
Endian (Endian &&)=delete | |
~Endian ()=delete | |
Endian & | operator= (const Endian &)=delete |
Endian & | operator= (Endian &&)=delete |
Static Public Member Functions | |
static bool | IsBigEndian () |
Is big-endian system? More... | |
static bool | IsLittleEndian () |
Is little-endian system? More... | |
static size_t | ReadBigEndian (const void *buffer, int16_t &value) |
Read big-endian signed 16-bit integer value from the given buffer. More... | |
static size_t | ReadBigEndian (const void *buffer, uint16_t &value) |
Read big-endian unsigned 16-bit integer value from the given buffer. More... | |
static size_t | ReadBigEndian (const void *buffer, int32_t &value) |
Read big-endian signed 32-bit integer value from the given buffer. More... | |
static size_t | ReadBigEndian (const void *buffer, uint32_t &value) |
Read big-endian unsigned 32-bit integer value from the given buffer. More... | |
static size_t | ReadBigEndian (const void *buffer, int64_t &value) |
Read big-endian signed 64-bit integer value from the given buffer. More... | |
static size_t | ReadBigEndian (const void *buffer, uint64_t &value) |
Read big-endian unsigned 64-bit integer value from the given buffer. More... | |
static size_t | ReadLittleEndian (const void *buffer, int16_t &value) |
Read little-endian signed 16-bit integer value from the given buffer. More... | |
static size_t | ReadLittleEndian (const void *buffer, uint16_t &value) |
Read little-endian unsigned 16-bit integer value from the given buffer. More... | |
static size_t | ReadLittleEndian (const void *buffer, int32_t &value) |
Read little-endian signed 32-bit integer value from the given buffer. More... | |
static size_t | ReadLittleEndian (const void *buffer, uint32_t &value) |
Read little-endian unsigned 32-bit integer value from the given buffer. More... | |
static size_t | ReadLittleEndian (const void *buffer, int64_t &value) |
Read little-endian signed 64-bit integer value from the given buffer. More... | |
static size_t | ReadLittleEndian (const void *buffer, uint64_t &value) |
Read little-endian unsigned 64-bit integer value from the given buffer. More... | |
static size_t | WriteBigEndian (void *buffer, int16_t value) |
Write big-endian signed 16-bit integer value into the given buffer. More... | |
static size_t | WriteBigEndian (void *buffer, uint16_t value) |
Write big-endian unsigned 16-bit integer value into the given buffer. More... | |
static size_t | WriteBigEndian (void *buffer, int32_t value) |
Write big-endian signed 32-bit integer value into the given buffer. More... | |
static size_t | WriteBigEndian (void *buffer, uint32_t value) |
Write big-endian unsigned 32-bit integer value into the given buffer. More... | |
static size_t | WriteBigEndian (void *buffer, int64_t value) |
Write big-endian signed 64-bit integer value into the given buffer. More... | |
static size_t | WriteBigEndian (void *buffer, uint64_t value) |
Write big-endian unsigned 64-bit integer value into the given buffer. More... | |
static size_t | WriteLittleEndian (void *buffer, int16_t value) |
Write little-endian signed 16-bit integer value into the given buffer. More... | |
static size_t | WriteLittleEndian (void *buffer, uint16_t value) |
Write little-endian unsigned 16-bit integer value into the given buffer. More... | |
static size_t | WriteLittleEndian (void *buffer, int32_t value) |
Write little-endian signed 32-bit integer value into the given buffer. More... | |
static size_t | WriteLittleEndian (void *buffer, uint32_t value) |
Write little-endian unsigned 32-bit integer value into the given buffer. More... | |
static size_t | WriteLittleEndian (void *buffer, int64_t value) |
Write little-endian signed 64-bit integer value into the given buffer. More... | |
static size_t | WriteLittleEndian (void *buffer, uint64_t value) |
Write little-endian unsigned 64-bit integer value into the given buffer. More... | |
Big/Little-endian utilities.
Big/Little-endian utilities contains methods for big<->little endian conversions.
Thread-safe.
|
delete |
|
delete |
|
delete |
|
delete |
|
inlinestatic |
Is big-endian system?
Definition at line 11 of file endian.inl.
|
inlinestatic |
Is little-endian system?
Definition at line 16 of file endian.inl.
|
inlinestatic |
Read big-endian signed 16-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Signed 16-bit integer value |
Definition at line 21 of file endian.inl.
|
inlinestatic |
Read big-endian signed 32-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Signed 32-bit integer value |
Definition at line 53 of file endian.inl.
|
inlinestatic |
Read big-endian signed 64-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Signed 64-bit integer value |
Definition at line 93 of file endian.inl.
|
inlinestatic |
Read big-endian unsigned 16-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Unsigned 16-bit integer value |
Definition at line 37 of file endian.inl.
|
inlinestatic |
Read big-endian unsigned 32-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Unsigned 32-bit integer value |
Definition at line 73 of file endian.inl.
|
inlinestatic |
Read big-endian unsigned 64-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Unsigned 64-bit integer value |
Definition at line 121 of file endian.inl.
|
inlinestatic |
Read little-endian signed 16-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Signed 16-bit integer value |
Definition at line 149 of file endian.inl.
|
inlinestatic |
Read little-endian signed 32-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Signed 32-bit integer value |
Definition at line 181 of file endian.inl.
|
inlinestatic |
Read little-endian signed 64-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Signed 64-bit integer value |
Definition at line 221 of file endian.inl.
|
inlinestatic |
Read little-endian unsigned 16-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Unsigned 16-bit integer value |
Definition at line 165 of file endian.inl.
|
inlinestatic |
Read little-endian unsigned 32-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Unsigned 32-bit integer value |
Definition at line 201 of file endian.inl.
|
inlinestatic |
Read little-endian unsigned 64-bit integer value from the given buffer.
buffer | - Buffer to read |
value | - Unsigned 64-bit integer value |
Definition at line 249 of file endian.inl.
|
inlinestatic |
Write big-endian signed 16-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Signed 16-bit integer value |
Definition at line 277 of file endian.inl.
|
inlinestatic |
Write big-endian signed 32-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Signed 32-bit integer value |
Definition at line 309 of file endian.inl.
|
inlinestatic |
Write big-endian signed 64-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Signed 64-bit integer value |
Definition at line 349 of file endian.inl.
|
inlinestatic |
Write big-endian unsigned 16-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Unsigned 16-bit integer value |
Definition at line 293 of file endian.inl.
|
inlinestatic |
Write big-endian unsigned 32-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Unsigned 32-bit integer value |
Definition at line 329 of file endian.inl.
|
inlinestatic |
Write big-endian unsigned 64-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Unsigned 64-bit integer value |
Definition at line 377 of file endian.inl.
|
inlinestatic |
Write little-endian signed 16-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Signed 16-bit integer value |
Definition at line 405 of file endian.inl.
|
inlinestatic |
Write little-endian signed 32-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Signed 32-bit integer value |
Definition at line 437 of file endian.inl.
|
inlinestatic |
Write little-endian signed 64-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Signed 64-bit integer value |
Definition at line 477 of file endian.inl.
|
inlinestatic |
Write little-endian unsigned 16-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Unsigned 16-bit integer value |
Definition at line 421 of file endian.inl.
|
inlinestatic |
Write little-endian unsigned 32-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Unsigned 32-bit integer value |
Definition at line 457 of file endian.inl.
|
inlinestatic |
Write little-endian unsigned 64-bit integer value into the given buffer.
buffer | - Buffer to write |
value | - Unsigned 64-bit integer value |
Definition at line 505 of file endian.inl.