12 #ifndef SERIALIZE_ARRAY_H
13 #define SERIALIZE_ARRAY_H
15 #include <sst/core/serialization/serializer.h>
19 namespace Serialization {
22 template <
class TPtr,
class IntType>
29 bufptr(buf), sizeptr(size) {}
54 template <
class TPtr,
class IntType>
56 array(TPtr*& buf, IntType& size)
61 template <
class IntType>
63 buffer(
void*& buf, IntType& size)
83 template <
class T,
int N>
84 class serialize<T[N], typename
std::enable_if<std::is_fundamental<T>::value || std::is_enum<T>::value>::type> {
95 template <
class T,
int N>
96 class serialize<T[N], typename
std::enable_if<!std::is_fundamental<T>::value && !std::is_enum<T>::value>::type> {
99 for (
int i = 0; i < N; i++ ) {
111 template <
class T,
class IntType>
112 class serialize<pvt::ser_array_wrapper<T,IntType>, typename std::enable_if<std::is_fundamental<T>::value || std::is_enum<T>::value>::type> {
115 ser.binary(arr.bufptr, arr.sizeptr);
123 template <
class T,
class IntType>
124 class serialize<pvt::ser_array_wrapper<T,IntType>, typename std::enable_if<!std::is_fundamental<T>::value && !std::is_enum<T>::value>::type> {
127 ser.primitive(arr.sizeptr);
128 for (
int i = 0; i < arr.sizeptr; i++ ) {
138 template <
class IntType>
139 class serialize<pvt::ser_array_wrapper<void,IntType> > {
142 ser.binary(arr.bufptr, arr.sizeptr);
154 template <
class TPtr>
158 ser.primitive(ptr.bufptr);
168 template <
class TPtr,
class IntType>
177 template <
class TPtr>
186 #endif // 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:35
Definition: serialize_array.h:43
Base serialize class.
Definition: serialize.h:32
Definition: serialize_array.h:23