Skip to content
Snippets Groups Projects
ConnectionFunctionGeneralSerialization.h 1.49 KiB
Newer Older
  • Learn to ignore specific revisions
  • //
    // Created by martin on 9/17/18.
    //
    
    #ifndef LIB4NEURO_CONNECTIONFUNCTIONGENERALSERIALIZATION_H
    #define LIB4NEURO_CONNECTIONFUNCTIONGENERALSERIALIZATION_H
    
    
    #include <boost/archive/text_oarchive.hpp>
    #include <boost/archive/text_iarchive.hpp>
    #include <boost/serialization/vector.hpp>
    #include <boost/serialization/export.hpp>
    
    #include "ConnectionFunctionGeneral.h"
    
    BOOST_CLASS_EXPORT_KEY(ConnectionFunctionGeneral);
    
    struct ConnectionFunctionGeneral :: access {
        template <class Archive>
        static void serialize(Archive &ar, ConnectionFunctionGeneral& c, const unsigned int version) {
            ar & c.param_indices;
        }
    };
    
    template void ConnectionFunctionGeneral::access::serialize<boost::archive::text_oarchive>(boost::archive::text_oarchive&, ConnectionFunctionGeneral&, const unsigned int);
    
    
    namespace boost {
        namespace serialization {
    
            /**
             * Serialization function
             * @tparam Archive Boost library template
             * @param ar Boost parameter - filled automatically during serialization!
             * @param n ConnectionFunctionGeneral instance
             * @param version Boost parameter - filled automatically during serialization!
             */
            template<class Archive>
            void serialize(Archive & ar, ConnectionFunctionGeneral& c, const unsigned int version)
            {
                ConnectionFunctionGeneral::access::serialize(ar, c, version);
            }
    
    
        } // namespace serialization
    } // namespace boost
    
    
    #endif //LIB4NEURO_CONNECTIONFUNCTIONGENERALSERIALIZATION_H