Cbeam
Loading...
Searching...
No Matches
cbeam::serialization::nested_map_serializer< Map > Struct Template Reference

Provides serialization and deserialization logic for nested_map<Key, Value>. More...

#include <nested_map.hpp>

Static Public Member Functions

static void serialize (const Map &map, container::buffer &stream)
 Serializes a nested map by serializing map.data and map.sub_tables, appending to stream.
 
static void deserialize (serialized_object &it, Map &map)
 Deserializes the content for map.data and map.sub_tables from the buffer, replacing map’s contents.
 

Detailed Description

template<typename Map>
struct cbeam::serialization::nested_map_serializer< Map >

Provides serialization and deserialization logic for nested_map<Key, Value>.

A nested map has data (a standard map of Key to Value) plus sub_tables (a map of Key to further nested_map). Both must be recursively serialized.

Member Function Documentation

◆ deserialize()

template<typename Map>
static void cbeam::serialization::nested_map_serializer< Map >::deserialize ( serialized_object & it,
Map & map )
inlinestatic

Deserializes the content for map.data and map.sub_tables from the buffer, replacing map’s contents.

Parameters
itThe position in the buffer from which to read.
mapThe nested_map object to populate.

◆ serialize()

template<typename Map>
static void cbeam::serialization::nested_map_serializer< Map >::serialize ( const Map & map,
container::buffer & stream )
inlinestatic

Serializes a nested map by serializing map.data and map.sub_tables, appending to stream.

Parameters
mapThe nested_map to serialize.
streamThe buffer to which the serialized data is appended.

The documentation for this struct was generated from the following file: