26 static void Swap(T& value);
31 static void Swap(
byte* pBuffer,
size_t size);
55 static void ReverseCopy(
const T& source, T& target);
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);
static void ReverseCopy(const T &source, T &target)
Copies the reverted bytes of the source argument to the target argument.
Definition: ByteConverter.hpp:105
This pure static class provides operation sfor byte converting from little to big endian and vice ver...
Definition: ByteConverter.hpp:13
void swap(BasicString< CharType, Alloc > &left, BasicString< CharType, Alloc > &right)
Swaps the content of the left string with the content of the right string.
Definition: BasicString.hxx:1574
std::int16_t int16
The Arp integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:33
Root namespace for the PLCnext API
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
std::int8_t int8
The Arp integer type of 1 byte size.
Definition: PrimitiveTypes.hpp:29
static void Swap(T &value)
Swaps the bytes of the as argument passed value of any primitive type.
Definition: ByteConverter.hpp:67
unsigned char byte
The Arp character type.
Definition: PrimitiveTypes.hpp:23