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>
23 namespace Serialization {
28 size_serializable(serializable* s, serializer& ser);
31 pack_serializable(serializable* s, serializer& ser);
34 unpack_serializable(serializable*& s, serializer& ser);
46 case serializer::SIZER:
47 pvt::size_serializable(s,ser);
49 case serializer::PACK:
50 pvt::pack_serializable(s,ser);
52 case serializer::UNPACK:
53 pvt::unpack_serializable(s,ser);
62 class serialize<T*,
typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable,T>::value>::type> {
70 case serializer::SIZER:
71 pvt::size_serializable(sp,ser);
73 case serializer::PACK:
74 pvt::pack_serializable(sp,ser);
76 case serializer::UNPACK:
77 pvt::unpack_serializable(sp,ser);
80 s =
static_cast<T*
>(sp);
87 serialize_intrusive_ptr(T*& t,
serializer& ser)
91 case serializer::SIZER:
92 pvt::size_serializable(s,ser);
94 case serializer::PACK:
95 pvt::pack_serializable(s,ser);
97 case serializer::UNPACK:
98 pvt::unpack_serializable(s,ser);
99 t =
dynamic_cast<T*
>(s);
105 class serialize <T, typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable,T>::value>::type> {
107 inline void operator()(T& t,
serializer& ser){
110 t.serialize_order(ser);
130 #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:110
Base serialize class.
Definition: serialize.h:33