12#ifndef SST_CORE_SERIALIZATION_SERIALIZE_MAP_H
13#define SST_CORE_SERIALIZATION_SERIALIZE_MAP_H
15#include "sst/core/serialization/serializer.h"
18#include <unordered_map>
22namespace Serialization {
24template <
class Key,
class Value>
27 typedef std::map<Key, Value> Map;
32 typedef typename std::map<Key, Value>::iterator iterator;
33 switch ( ser.mode() ) {
35 case serializer::SIZER:
37 size_t size = m.size();
39 iterator it, end = m.end();
40 for ( it = m.begin(); it != end; ++it ) {
47 case serializer::PACK:
49 size_t size = m.size();
51 iterator it, end = m.end();
52 for ( it = m.begin(); it != end; ++it ) {
58 case serializer::UNPACK:
62 for (
size_t i = 0; i < size; ++i ) {
75template <
class Key,
class Value>
78 typedef std::unordered_map<Key, Value> Map;
83 typedef typename std::unordered_map<Key, Value>::iterator iterator;
84 switch ( ser.mode() ) {
86 case serializer::SIZER:
88 size_t size = m.size();
90 iterator it, end = m.end();
91 for ( it = m.begin(); it != end; ++it ) {
98 case serializer::PACK:
100 size_t size = m.size();
102 iterator it, end = m.end();
103 for ( it = m.begin(); it != end; ++it ) {
109 case serializer::UNPACK:
113 for (
size_t i = 0; i < size; ++i ) {
Base serialize class.
Definition: serialize.h:32
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35