26 static void Swap(T& value);
31 static void Swap(
byte* pBuffer,
size_t size);
41 static void Swap(
byte& value);
55 static void ReverseCopy(
const T& source, T& target);
61 static void ReverseCopy(
const byte* pSource,
byte* pTarget,
size_t size);
69 Swap((
byte*)&value,
sizeof(T));
74 std::reverse(pBuffer, pBuffer + size);
90 std::swap(*
reinterpret_cast<byte*
>(&value), *(
reinterpret_cast<byte*
>(&value) + 1));
96 std::swap(*
reinterpret_cast<byte*
>(&value), *(
reinterpret_cast<byte*
>(&value) + 1));
101 std::reverse_copy(pSource, pSource + size, pTarget);
107 const byte* pSource =
reinterpret_cast<const byte*
>(&source);
108 byte* pTarget =
reinterpret_cast<byte*
>(&target);
109 std::reverse_copy(pSource, pSource +
sizeof(T), pTarget);
This pure static class provides operation sfor byte converting from little to big endian and vice ver...
Definition: ByteConverter.hpp:14
static void Swap(T &value)
Swaps the bytes of the as argument passed value of any primitive type.
Definition: ByteConverter.hpp:67
static void ReverseCopy(const T &source, T &target)
Copies the reverted bytes of the source argument to the target argument.
Definition: ByteConverter.hpp:105
void swap(BasicString< CharType, Alloc > &left, BasicString< CharType, Alloc > &right) noexcept
Swaps the content of the left string with the content of the right string.
Definition: BasicString.hxx:1698
std::int8_t int8
The Arp integer type of 1 byte size.
Definition: PrimitiveTypes.hpp:29
std::int16_t int16
The Arp integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:33
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
Root namespace for the PLCnext API