Newer
Older
//
// Created by martin on 22.11.18.
//
#ifndef LIB4NEURO_NORMALIZATIONSTRATEGYSERIALIZATION_H
#define LIB4NEURO_NORMALIZATIONSTRATEGYSERIALIZATION_H
#include <boost/serialization/base_object.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/export.hpp>
Martin Beseda
committed
#include <boost/serialization/vector.hpp>
#include "NormalizationStrategy.h"
BOOST_SERIALIZATION_ASSUME_ABSTRACT(NormalizationStrategy);
BOOST_CLASS_EXPORT_KEY(NormalizationStrategy);
BOOST_CLASS_EXPORT_KEY(DoubleUnitStrategy);
struct NormalizationStrategy::access {
template<class Archive>
static void serialize(Archive &ar, NormalizationStrategy& ns, const unsigned int version) {
Martin Beseda
committed
ar & ns.max_min_inp_val;
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
}
};
struct DoubleUnitStrategy::access {
template<class Archive>
static void serialize(Archive &ar, DoubleUnitStrategy &s, const unsigned int version) {
ar & boost::serialization::base_object<NormalizationStrategy>(s);
}
};
namespace boost {
namespace serialization {
/**
* Serialization function
* @tparam Archive Boost library template
* @param ar Boost parameter - filled automatically during serialization!
* @param ns NormalizationStrategy instance
* @param version Boost parameter - filled automatically during serialization!
*/
template<class Archive>
void serialize(Archive & ar, NormalizationStrategy& ns, const unsigned int version)
{
NormalizationStrategy::access::serialize(ar, ns, version);
}
/**
* Serialization function
* @tparam Archive Boost library template
* @param ar Boost parameter - filled automatically during serialization!
* @param s DoubleUnitStrategy instance
* @param version Boost parameter - filled automatically during serialization!
*/
template<class Archive>
void serialize(Archive & ar, DoubleUnitStrategy& s, const unsigned int version)
{
DoubleUnitStrategy::access::serialize(ar, s, version);
}
} // namespace serialization
} // namespace boost
#endif //LIB4NEURO_NORMALIZATIONSTRATEGYSERIALIZATION_H