CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
29 template<
typename TIo,
typename TValue,
typename TTag,
typename TBaseValue>
31 output.write({ reinterpret_cast<const uint8_t*>(&value),
sizeof(TValue) });
35 template<
typename TIo>
36 void Write64(TIo& output, uint64_t value) {
37 output.write({ reinterpret_cast<const uint8_t*>(&value),
sizeof(uint64_t) });
41 template<
typename TIo>
42 void Write32(TIo& output, uint32_t value) {
43 output.write({ reinterpret_cast<const uint8_t*>(&value),
sizeof(uint32_t) });
47 template<
typename TIo>
48 void Write16(TIo& output, uint16_t value) {
49 output.write({ reinterpret_cast<const uint8_t*>(&value),
sizeof(uint16_t) });
53 template<
typename TIo>
54 void Write8(TIo& output, uint8_t value) {
55 output.write({ reinterpret_cast<const uint8_t*>(&value),
sizeof(uint8_t) });
59 template<
typename TIo,
typename TValue,
typename TTag,
typename TBaseValue>
61 input.read({ reinterpret_cast<uint8_t*>(&value),
sizeof(TValue) });
65 template<
typename TIo>
68 input.read({ reinterpret_cast<uint8_t*>(&result),
sizeof(uint64_t) });
73 template<
typename TIo>
76 input.read({ reinterpret_cast<uint8_t*>(&result),
sizeof(uint32_t) });
81 template<
typename TIo>
84 input.read({ reinterpret_cast<uint8_t*>(&result),
sizeof(uint16_t) });
89 template<
typename TIo>
92 input.read({ reinterpret_cast<uint8_t*>(&result),
sizeof(uint8_t) });
100 typename X = std::enable_if_t<utils::traits::is_pod_v<TValue>>
void Read(TIo &input, utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Reads base value from input.
Definition: PodIoUtils.h:60
void Write16(TIo &output, uint16_t value)
Writes value into output.
Definition: PodIoUtils.h:48
void Write8(TIo &output, uint8_t value)
Writes value into output.
Definition: PodIoUtils.h:54
auto Read32(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:74
Base class for immutable wrappers of basic types, to provide some type-safety.
Definition: BaseValue.h:30
auto Read8(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:90
void Write(TIo &output, const utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Writes base value into output.
Definition: PodIoUtils.h:30
void Write64(TIo &output, uint64_t value)
Writes value into output.
Definition: PodIoUtils.h:36
auto Read16(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:82
Definition: AddressExtractionExtension.cpp:28
auto Read64(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:66
void Write32(TIo &output, uint32_t value)
Writes value into output.
Definition: PodIoUtils.h:42