12 #ifndef SST_CORE_SERIALIZATION_SERIALIZE_SERIALIZABLE_H 13 #define SST_CORE_SERIALIZATION_SERIALIZE_SERIALIZABLE_H 15 #include "sst/core/serialization/serializable.h" 16 #include "sst/core/serialization/serialize.h" 17 #include "sst/core/serialization/serializer.h" 23 namespace Serialization {
27 void size_serializable(serializable* s, serializer& ser);
29 void pack_serializable(serializable* s, serializer& ser);
31 void unpack_serializable(serializable*& s, serializer& ser);
34 void size_pointer(serializable* s, serializer& ser);
36 void pack_pointer(serializable* s, serializer& ser);
38 void unpack_pointer(serializable*& s, serializer& ser);
50 switch ( ser.mode() ) {
51 case serializer::SIZER:
52 pvt::size_serializable(s, ser);
54 case serializer::PACK:
55 pvt::pack_serializable(s, ser);
57 case serializer::UNPACK:
58 pvt::unpack_serializable(s, ser);
66 T*,
typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable, T>::value>::type>
74 switch ( ser.mode() ) {
75 case serializer::SIZER:
76 pvt::size_serializable(sp, ser);
78 case serializer::PACK:
79 pvt::pack_serializable(sp, ser);
81 case serializer::UNPACK:
82 pvt::unpack_serializable(sp, ser);
85 s =
static_cast<T*
>(sp);
91 serialize_intrusive_ptr(T*& t,
serializer& ser)
94 switch ( ser.mode() ) {
95 case serializer::SIZER:
96 pvt::size_serializable(s, ser);
98 case serializer::PACK:
99 pvt::pack_serializable(s, ser);
101 case serializer::UNPACK:
102 pvt::unpack_serializable(s, ser);
103 t =
dynamic_cast<T*
>(s);
110 T, typename
std::enable_if<std::is_base_of<SST::Core::Serialization::serializable, T>::value>::type>
118 t.serialize_order(ser);
137 #endif // SST_CORE_SERIALIZATION_SERIALIZE_SERIALIZABLE_H This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Base serialize class.
Definition: serialize.h:32
Definition: serializable.h:118
Serialization "gateway" object.
Definition: serialize.h:110