12 #ifndef SST_CORE_SERIALIZATION_SERIALIZE_H 13 #define SST_CORE_SERIALIZATION_SERIALIZE_H 15 #include "sst/core/serialization/serializer.h" 16 #include "sst/core/warnmacros.h" 23 namespace Serialization {
30 template <
class T,
class Enable =
void>
34 inline void operator()(T& UNUSED(t),
serializer& UNUSED(ser))
44 static_assert(std::is_fundamental<T>::value,
"Trying to serialize an object that is not serializable.");
45 static_assert(!std::is_fundamental<T>::value,
"Trying to serialize an object that is not serializable.");
53 class serialize<T, typename
std::enable_if<std::is_fundamental<T>::value || std::is_enum<T>::value>::type>
56 inline void operator()(T& t,
serializer& ser) { ser.primitive(t); }
92 class serialize<T*,
typename std::enable_if<std::is_fundamental<T>::value || std::is_enum<T>::value>::type>
97 switch ( ser.mode() ) {
98 case serializer::SIZER:
101 case serializer::PACK:
104 case serializer::UNPACK:
115 template <
class U,
class V>
119 inline void operator()(std::pair<U, V>& t,
serializer& ser)
137 #include "sst/core/serialization/serialize_array.h" 138 #include "sst/core/serialization/serialize_deque.h" 139 #include "sst/core/serialization/serialize_list.h" 140 #include "sst/core/serialization/serialize_map.h" 141 #include "sst/core/serialization/serialize_set.h" 142 #include "sst/core/serialization/serialize_string.h" 143 #include "sst/core/serialization/serialize_vector.h" 145 #endif // SST_CORE_SERIALIZATION_SERIALIZE_H This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:34
Base serialize class.
Definition: serialize.h:31