12 #ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H 13 #define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H 15 #ifndef SST_INCLUDING_SERIALIZE_H 17 "The header file sst/core/serialization/impl/serialize_multiset.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" 20 #include "sst/core/serialization/serializer.h" 23 #include <unordered_set> 27 namespace Serialization {
29 template <
class T,
class C>
32 typedef std::multiset<T, C> MultiSet;
37 typedef typename std::multiset<T>::iterator iterator;
38 switch ( ser.mode() ) {
39 case serializer::SIZER:
41 size_t size = v.size();
43 iterator it, end = v.end();
44 for ( it = v.begin(); it != end; ++it ) {
45 T& t =
const_cast<T&
>(*it);
50 case serializer::PACK:
52 size_t size = v.size();
54 iterator it, end = v.end();
55 for ( it = v.begin(); it != end; ++it ) {
56 T& t =
const_cast<T&
>(*it);
61 case serializer::UNPACK:
65 for (
size_t i = 0; i < size; ++i ) {
78 void operator()(MultiSet& UNUSED(v),
serializer& UNUSED(ser),
const char* UNUSED(name))
87 typedef std::unordered_multiset<T> MultiSet;
92 typedef typename std::unordered_multiset<T>::iterator iterator;
93 switch ( ser.mode() ) {
94 case serializer::SIZER:
96 size_t size = v.size();
98 iterator it, end = v.end();
99 for ( it = v.begin(); it != end; ++it ) {
100 T& t =
const_cast<T&
>(*it);
105 case serializer::PACK:
107 size_t size = v.size();
109 iterator it, end = v.end();
110 for ( it = v.begin(); it != end; ++it ) {
111 T& t =
const_cast<T&
>(*it);
116 case serializer::UNPACK:
120 for (
size_t i = 0; i < size; ++i ) {
127 case serializer::MAP:
133 void operator()(MultiSet& UNUSED(v),
serializer& UNUSED(ser),
const char* UNUSED(name))
143 #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:43
Serialization "gateway" object.
Definition: serialize.h:133