CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace cache {
29 template<
typename TDescriptor>
32 using KeyType =
typename TDescriptor::KeyType;
41 io::Write64(output, static_cast<uint64_t>(value.size()));
42 for (
const auto& identifier : value.identifiers())
43 Write(output, identifier);
51 auto key = io::Read<typename ValueType::GroupingKeyType>(input);
55 for (
auto i = 0u; i <
size; ++i) {
56 typename ValueType::Identifiers::key_type identifier;
57 Read(input, identifier);
58 value.add(identifier);
70 template<
size_t N,
typename TTag>
80 template<
size_t N,
typename TTag>
void Read(TIo &input, utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Reads base value from input.
Definition: PodIoUtils.h:60
const std::string & str() const
Returns underlying string.
Definition: StringOutputStream.h:44
static void Write(io::OutputStream &input, const utils::ByteArray< N, TTag > &value)
Definition: IdentifierGroupSerializer.h:81
virtual void write(const RawBuffer &buffer)=0
static std::string SerializeValue(const ValueType &value)
Serializes value to string.
Definition: IdentifierGroupSerializer.h:37
static void Read(io::InputStream &input, utils::ByteArray< N, TTag > &value)
Definition: IdentifierGroupSerializer.h:71
static void Read(io::InputStream &input, T &value)
Definition: IdentifierGroupSerializer.h:66
static void Write(io::OutputStream &input, const T &value)
Definition: IdentifierGroupSerializer.h:76
void Write(TIo &output, const utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Writes base value into output.
Definition: PodIoUtils.h:30
uint64_t size
Definition: MemoryCounters.cpp:65
void Write64(TIo &output, uint64_t value)
Writes value into output.
Definition: PodIoUtils.h:36
static size_t Size(const ValueType &value)
Definition: IdentifierGroupSerializer.h:86
Serializer for identifier group elements.
Definition: IdentifierGroupSerializer.h:30
typename SecretLockInfoCacheTypes::HeightGroupingTypesDescriptor ::KeyType KeyType
Definition: IdentifierGroupSerializer.h:32
Definition: AddressExtractionExtension.cpp:28
auto Read64(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:66
String output stream.
Definition: StringOutputStream.h:27
static ValueType DeserializeValue(const RawBuffer &buffer)
Deserializes value from buffer.
Definition: IdentifierGroupSerializer.h:49
Base class for wrappers of byte array types, to provide some type-safety.
Definition: ByteArray.h:29
Writer interface.
Definition: Stream.h:41
BasicRawBuffer< const uint8_t > RawBuffer
A const binary buffer.
Definition: RawBuffer.h:62
typename SecretLockInfoCacheTypes::HeightGroupingTypesDescriptor ::ValueType ValueType
Definition: IdentifierGroupSerializer.h:33