Pothos  0.5.0-ga4964040
The Pothos dataflow programming software suite
Macros
Split.hpp File Reference
#include <Pothos/Config.hpp>
#include <Pothos/Archive/Invoke.hpp>
#include <type_traits>

Go to the source code of this file.

Macros

#define POTHOS_SERIALIZATION_SPLIT_FREE(T)
 
#define POTHOS_SERIALIZATION_SPLIT_MEMBER()
 

Detailed Description

Serialization dispatch macros for separate save/load.

Macro Definition Documentation

#define POTHOS_SERIALIZATION_SPLIT_FREE (   T)
Value:
namespace Pothos { namespace serialization { \
template <typename Archive> \
void serialize(Archive &ar, T &t, const unsigned int ver) { \
} \
}}
Definition: ArchiveEntry.hpp:20
void serialize(Archive &ar, std::complex< T > &t, const unsigned int ver)
Definition: Complex.hpp:37
std::enable_if< std::is_same< typename Archive::isSave, std::true_type >::value >::type invokeSplit(Archive &ar, T &value, const unsigned int ver)
Definition: Invoke.hpp:69

Declare a serialize() function that can dispatch to an individually declared save and load function. Call in the outside scope, no namespaces or functions.

#define POTHOS_SERIALIZATION_SPLIT_MEMBER ( )
Value:
template <typename Archive> \
typename std::enable_if<std::is_same<typename Archive::isSave, std::true_type>::value>::type \
serialize(Archive &ar, const unsigned int ver) { \
this->save(ar, ver); \
} \
template <typename Archive> \
typename std::enable_if<std::is_same<typename Archive::isSave, std::false_type>::value>::type \
serialize(Archive &ar, const unsigned int ver) { \
this->load(ar, ver); \
}
void serialize(Archive &ar, std::complex< T > &t, const unsigned int ver)
Definition: Complex.hpp:37

Declare a serialize() function that can dispatch to individually declared save and load member functions. Call in the public part of a struct or class declaration.