12 #ifndef SERIALIZE_SERIALIZABLE_H
13 #define SERIALIZE_SERIALIZABLE_H
15 #include "sst/core/serialization/serializable.h"
16 #include "sst/core/serialization/serializer.h"
17 #include "sst/core/serialization/serialize.h"
22 namespace Serialization {
27 size_serializable(serializable* s, serializer& ser);
30 pack_serializable(serializable* s, serializer& ser);
33 unpack_serializable(serializable*& s, serializer& ser);
45 case serializer::SIZER:
46 pvt::size_serializable(s,ser);
48 case serializer::PACK:
49 pvt::pack_serializable(s,ser);
51 case serializer::UNPACK:
52 pvt::unpack_serializable(s,ser);
61 class serialize<T*,
typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable,T>::value>::type> {
69 case serializer::SIZER:
70 pvt::size_serializable(sp,ser);
72 case serializer::PACK:
73 pvt::pack_serializable(sp,ser);
75 case serializer::UNPACK:
76 pvt::unpack_serializable(sp,ser);
79 s =
static_cast<T*
>(sp);
86 serialize_intrusive_ptr(T*& t,
serializer& ser)
90 case serializer::SIZER:
91 pvt::size_serializable(s,ser);
93 case serializer::PACK:
94 pvt::pack_serializable(s,ser);
96 case serializer::UNPACK:
97 pvt::unpack_serializable(s,ser);
98 t =
dynamic_cast<T*
>(s);
104 class serialize <T, typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable,T>::value>::type> {
106 inline void operator()(T& t,
serializer& ser){
109 t.serialize_order(ser);
129 #endif // 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
Definition: serializable.h:109
Base serialize class.
Definition: serialize.h:33