12 #ifndef SST_CORE_SERIALIZATION_SERIALIZABLE_H 13 #define SST_CORE_SERIALIZATION_SERIALIZABLE_H 15 #include "sst/core/serialization/serializable_base.h" 16 #include "sst/core/serialization/serialize.h" 21 namespace Serialization {
27 static constexpr uint32_t NullClsId = std::numeric_limits<uint32_t>::max();
54 T*,
typename std::enable_if<std::is_base_of<SST::Core::Serialization::serializable, T>::value>::type>
62 switch ( ser.mode() ) {
63 case serializer::SIZER:
64 pvt::size_serializable(sp, ser);
66 case serializer::PACK:
67 pvt::pack_serializable(sp, ser);
69 case serializer::UNPACK:
70 pvt::unpack_serializable(sp, ser);
76 s =
static_cast<T*
>(sp);
79 void operator()(T*& s,
serializer& ser,
const char* name)
82 switch ( ser.mode() ) {
83 case serializer::SIZER:
84 pvt::size_serializable(sp, ser);
86 case serializer::PACK:
87 pvt::pack_serializable(sp, ser);
89 case serializer::UNPACK:
90 pvt::unpack_serializable(sp, ser);
93 pvt::map_serializable(sp, ser, name);
96 s =
static_cast<T*
>(sp);
102 serialize_intrusive_ptr(T*& t,
serializer& ser)
105 switch ( ser.mode() ) {
106 case serializer::SIZER:
107 pvt::size_serializable(s, ser);
109 case serializer::PACK:
110 pvt::pack_serializable(s, ser);
112 case serializer::UNPACK:
113 pvt::unpack_serializable(s, ser);
114 t =
dynamic_cast<T*
>(s);
116 case serializer::MAP:
124 T, typename
std::enable_if<std::is_base_of<SST::Core::Serialization::serializable, T>::value>::type>
132 t.serialize_order(ser);
135 inline void operator()(T& UNUSED(t),
serializer& UNUSED(ser),
const char* UNUSED(name))
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:43
Base serialize class.
Definition: serialize.h:45
Definition: serializable.h:24
Serialization "gateway" object.
Definition: serialize.h:133
Definition: serializable_base.h:118