12 #ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H 13 #define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H 15 #ifndef SST_INCLUDING_SERIALIZE_H 17 "The header file sst/core/serialization/impl/serialize_array.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" 20 #include "sst/core/serialization/serializer.h" 24 namespace Serialization {
27 template <
class TPtr,
class IntType>
57 template <
class TPtr,
class IntType>
59 array(TPtr*& buf, IntType& size)
64 template <
class IntType>
66 buffer(
void*& buf, IntType& size)
86 template <
class T,
int N>
87 class serialize_impl<T[N], typename
std::enable_if<std::is_fundamental<T>::value || std::is_enum<T>::value>::type>
91 void operator()(T arr[N],
serializer& ser) { ser.array<T, N>(arr); }
93 void operator()(T UNUSED(arr[N]),
serializer& UNUSED(ser),
const char* UNUSED(name))
103 template <
class T,
int N>
104 class serialize_impl<T[N], typename
std::enable_if<!std::is_fundamental<T>::value && !std::is_enum<T>::value>::type>
110 for (
int i = 0; i < N; i++ ) {
115 void operator()(T UNUSED(arr[N]),
serializer& UNUSED(ser),
const char* UNUSED(name))
127 template <
class T,
class IntType>
129 pvt::ser_array_wrapper<T, IntType>,
130 typename std::enable_if<std::is_fundamental<T>::value || std::is_enum<T>::value>::type>
146 template <
class T,
class IntType>
148 pvt::ser_array_wrapper<T, IntType>,
149 typename std::enable_if<!std::is_fundamental<T>::value && !std::is_enum<T>::value>::type>
155 ser.primitive(arr.sizeptr);
156 for (
int i = 0; i < arr.sizeptr; i++ ) {
171 template <
class IntType>
193 template <
class TPtr>
209 template <
class TPtr,
class IntType>
220 template <
class TPtr>
232 #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H 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: serialize_array.h:47
Serialization "gateway" object.
Definition: serialize.h:133
Definition: serialize_array.h:28