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);
42 switch ( ser.mode() ) {
43 case serializer::SIZER:
44 pvt::size_serializable(s, ser);
46 case serializer::PACK:
47 pvt::pack_serializable(s, ser);
49 case serializer::UNPACK:
50 pvt::unpack_serializable(s, ser);
57 class serialize<T*,
typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable, T>::value>::type>
64 switch ( ser.mode() ) {
65 case serializer::SIZER:
66 pvt::size_serializable(sp, ser);
68 case serializer::PACK:
69 pvt::pack_serializable(sp, ser);
71 case serializer::UNPACK:
72 pvt::unpack_serializable(sp, ser);
75 s =
static_cast<T*
>(sp);
81 serialize_intrusive_ptr(T*& t,
serializer& ser)
84 switch ( ser.mode() ) {
85 case serializer::SIZER:
86 pvt::size_serializable(s, ser);
88 case serializer::PACK:
89 pvt::pack_serializable(s, ser);
91 case serializer::UNPACK:
92 pvt::unpack_serializable(s, ser);
93 t =
dynamic_cast<T*
>(s);
99 class serialize<T, typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable, T>::value>::type>
106 t.serialize_order(ser);
125 #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:34
Definition: serializable.h:118
Base serialize class.
Definition: serialize.h:31