Pothos  0.5.0-ga4964040
The Pothos dataflow programming software suite
Complex.hpp
Go to the documentation of this file.
1 
11 #pragma once
12 #include <Pothos/Config.hpp>
14 #include <complex> //pair
15 
16 namespace Pothos {
17 namespace serialization {
18 
19 template<typename Archive, typename T>
20 void save(Archive &ar, const std::complex<T> &t, const unsigned int)
21 {
22  ar << t.real();
23  ar << t.imag();
24 }
25 
26 template<typename Archive, typename T>
27 void load(Archive &ar, std::complex<T> &t, const unsigned int)
28 {
29  T real, imag;
30  ar >> real;
31  ar >> imag;
32  t.real(real);
33  t.imag(imag);
34 }
35 
36 template <typename Archive, typename T>
37 void serialize(Archive &ar, std::complex<T> &t, const unsigned int ver)
38 {
40 }
41 
42 }}
Definition: ArchiveEntry.hpp:20
void save(Archive &ar, const std::complex< T > &t, const unsigned int)
Definition: Complex.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
void load(Archive &ar, std::complex< T > &t, const unsigned int)
Definition: Complex.hpp:27