Skip to content
Snippets Groups Projects
Commit 815a5aa6 authored by Martin Beseda's avatar Martin Beseda
Browse files

NEW: Added file for definitions of own exceptions

parent 0d202d3c
No related branches found
No related tags found
No related merge requests found
//
// Created by martin on 9/18/18.
//
#ifndef LIB4NEURO_DATASETSERIALIZATION_H
#define LIB4NEURO_DATASETSERIALIZATION_H
#endif //LIB4NEURO_DATASETSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_EXPRTKWRAPPERSERIALIZATION_H
#define LIB4NEURO_EXPRTKWRAPPERSERIALIZATION_H
#endif //LIB4NEURO_EXPRTKWRAPPERSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_CONNECTIONFUNCTIONGENERALSERIALIZATION_H
#define LIB4NEURO_CONNECTIONFUNCTIONGENERALSERIALIZATION_H
#endif //LIB4NEURO_CONNECTIONFUNCTIONGENERALSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_CONNECTIONFUNCTIONIDENTITYSERIALIZATION_H
#define LIB4NEURO_CONNECTIONFUNCTIONIDENTITYSERIALIZATION_H
#endif //LIB4NEURO_CONNECTIONFUNCTIONIDENTITYSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_NEURALNETWORKSERIALIZATION_H
#define LIB4NEURO_NEURALNETWORKSERIALIZATION_H
#endif //LIB4NEURO_NEURALNETWORKSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_NEURALNETWORKSUMSERIALIZATION_H
#define LIB4NEURO_NEURALNETWORKSUMSERIALIZATION_H
#endif //LIB4NEURO_NEURALNETWORKSUMSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_NEURON_BINARY_SERIALIZATION_H
#define LIB4NEURO_NEURON_BINARY_SERIALIZATION_H
#include <boost/serialization/base_object.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include "NeuronBinary.h"
BOOST_CLASS_EXPORT(NeuronBinary);
struct NeuronBinary :: access {
template <class Archive>
static void serialize(Archive &ar, NeuronBinary& n, const unsigned int version) {
ar & boost::serialization::base_object<Neuron>(n);
}
};
namespace boost {
namespace serialization {
/**
* Serialization function
* @tparam Archive Boost library template
* @param ar Boost parameter - filled automatically during serialization!
* @param n NeuronBinary instance
* @param version Boost parameter - filled automatically during serialization!
*/
template<class Archive>
void serialize(Archive & ar, NeuronBinary& n, const unsigned int version)
{
NeuronBinary::access::serialize(ar, n, version);
}
} // namespace serialization
} // namespace boost
#endif //LIB4NEURO_NEURON_BINARY_SERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_NEURON_SERIALIZATION_H
#define LIB4NEURO_NEURON_SERIALIZATION_H
#include <boost/serialization/base_object.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/export.hpp>
#include "NeuronConstant.h"
#include "../settings.h"
#include "Neuron_serialization.h"
BOOST_CLASS_EXPORT(NeuronConstant);
struct NeuronConstant :: access {
template <class Archive>
static void serialize(Archive &ar, NeuronConstant& n, const unsigned int version) {
ar & boost::serialization::base_object<Neuron>(n);
ar & n.p;
}
};
namespace boost {
namespace serialization {
/**
* Serialization function
* @tparam Archive Boost library template
* @param ar Boost parameter - filled automatically during serialization!
* @param n NeuronConstant instance
* @param version Boost parameter - filled automatically during serialization!
*/
template<class Archive>
void serialize(Archive & ar, NeuronConstant& n, const unsigned int version)
{
NeuronConstant::access::serialize(ar, n, version);
}
} // namespace serialization
} // namespace boost
#endif //LIB4NEURO_NEURON_SERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_NEURONLINEARSERIALIZATION_H
#define LIB4NEURO_NEURONLINEARSERIALIZATION_H
#endif //LIB4NEURO_NEURONLINEARSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_NEURONLOGISTICSERIALIZATION_H
#define LIB4NEURO_NEURONLOGISTICSERIALIZATION_H
#endif //LIB4NEURO_NEURONLOGISTICSERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_NEURON_SERIALIZATION_H
#define LIB4NEURO_NEURON_SERIALIZATION_H
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/access.hpp>
#include <boost/serialization/assume_abstract.hpp>
#include "Neuron.h"
BOOST_SERIALIZATION_ASSUME_ABSTRACT(Neuron);
struct Neuron :: access {
template <class Archive>
static void serialize(Archive &ar, Neuron& n, const unsigned int version) {}
};
namespace boost {
namespace serialization {
/**
* Serialization function
* @tparam Archive Boost library template
* @param ar Boost parameter - filled automatically during serialization!
* @param n Neuron instance
* @param version Boost parameter - filled automatically during serialization!
*/
template<class Archive>
void serialize(Archive & ar, Neuron& n, const unsigned int version)
{
Neuron::access::serialize(ar, n, version);
}
} // namespace serialization
} // namespace boost
#endif //LIB4NEURO_NEURON_SERIALIZATION_H
//
// Created by martin on 9/17/18.
//
#ifndef LIB4NEURO_EXCEPTIONS_H
#define LIB4NEURO_EXCEPTIONS_H
//TODO implement NotImplementedException according to C++17
//class NotImplementedException : public std::logic_error {
//public:
// const char* what() {
// return "Function not yet implemented!";
// }
//};
#endif //LIB4NEURO_EXCEPTIONS_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment