Pothos  0.7.0-gf7fbae99
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

◆ POTHOS_SERIALIZATION_SPLIT_FREE

#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
std::enable_if< Archive::isSave::value >::type invokeSplit(Archive &ar, T &value, const unsigned int ver)
Definition: Invoke.hpp:69
void serialize(Archive &ar, std::complex< T > &t, const unsigned int ver)
Definition: Complex.hpp:37

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

◆ POTHOS_SERIALIZATION_SPLIT_MEMBER

#define POTHOS_SERIALIZATION_SPLIT_MEMBER ( )
Value:
template <typename Archive> \
typename std::enable_if<Archive::isSave::value>::type \
serialize(Archive &ar, const unsigned int ver) { \
this->save(ar, ver); \
} \
template <typename Archive> \
typename std::enable_if<!Archive::isSave::value>::type \
serialize(Archive &ar, const unsigned int ver) { \
this->load(ar, ver); \
}

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.