Cbeam
Loading...
Searching...
No Matches
cbeam::serialization::traits< cbeam::container::nested_map< Key, Value > > Struct Template Reference

Specialization of traits for cbeam::container::nested_map<Key, Value>. More...

#include <nested_map.hpp>

Static Public Member Functions

static void serialize (const cbeam::container::nested_map< Key, Value > &map, container::buffer &stream)
 
static void deserialize (serialized_object &it, cbeam::container::nested_map< Key, Value > &map)
 
static void serialize (const cbeam::container::nested_map< Key, Value > &val, container::buffer &stream)
 Required to serialize an object of type T into a shared_buffer stream.
 
static void deserialize (serialized_object &it, cbeam::container::nested_map< Key, Value > &val)
 Required to deserialize an object of type T from a serialized memory block, incrementing the iterator it.
 

Detailed Description

template<typename Key, typename Value>
struct cbeam::serialization::traits< cbeam::container::nested_map< Key, Value > >

Specialization of traits for cbeam::container::nested_map<Key, Value>.

Uses nested_map_serializer for serialization and deserialization.

Template Parameters
KeyThe key type of the nested map.
ValueThe value type of the nested map.

Member Function Documentation

◆ deserialize() [1/2]

template<typename Key, typename Value>
static void cbeam::serialization::traits< cbeam::container::nested_map< Key, Value > >::deserialize ( serialized_object & it,
cbeam::container::nested_map< Key, Value > & map )
inlinestatic

◆ deserialize() [2/2]

static void cbeam::serialization::traits< cbeam::container::nested_map< Key, Value > >::deserialize ( serialized_object & it,
cbeam::container::nested_map< Key, Value > & val )
inlinestatic

Required to deserialize an object of type T from a serialized memory block, incrementing the iterator it.

Parameters
itA reference to a pointer to the serialized memory block.
valA reference to the object of type T, where the deserialized data will be stored.

This method should deserialize an object of type T from a serialized memory block, incrementing the iterator it to point to the next part of the serialized data. It should handle different types of data, managing memory and type conversion as needed.

◆ serialize() [1/2]

template<typename Key, typename Value>
static void cbeam::serialization::traits< cbeam::container::nested_map< Key, Value > >::serialize ( const cbeam::container::nested_map< Key, Value > & map,
container::buffer & stream )
inlinestatic

◆ serialize() [2/2]

static void cbeam::serialization::traits< cbeam::container::nested_map< Key, Value > >::serialize ( const cbeam::container::nested_map< Key, Value > & val,
container::buffer & stream )
inlinestatic

Required to serialize an object of type T into a shared_buffer stream.

Parameters
valThe object to serialize.
streamThe shared_buffer stream into which the object is serialized.

This method should take an object of type T and serialize it into a container::buffer stream. by using its append method.


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