Pothos  0.5.0-ga4964040
The Pothos dataflow programming software suite
Split.hpp
Go to the documentation of this file.
1 
11 #pragma once
12 #include <Pothos/Config.hpp>
14 #include <type_traits>
15 
21 #define POTHOS_SERIALIZATION_SPLIT_FREE(T) \
22  namespace Pothos { namespace serialization { \
23  template <typename Archive> \
24  void serialize(Archive &ar, T &t, const unsigned int ver) { \
25  Pothos::serialization::invokeSplit(ar, t, ver); \
26  } \
27  }}
28 
34 #define POTHOS_SERIALIZATION_SPLIT_MEMBER() \
35  template <typename Archive> \
36  typename std::enable_if<std::is_same<typename Archive::isSave, std::true_type>::value>::type \
37  serialize(Archive &ar, const unsigned int ver) { \
38  this->save(ar, ver); \
39  } \
40  template <typename Archive> \
41  typename std::enable_if<std::is_same<typename Archive::isSave, std::false_type>::value>::type \
42  serialize(Archive &ar, const unsigned int ver) { \
43  this->load(ar, ver); \
44  }