hpp-util 6.0.0
Debugging tools for the HPP project.
Loading...
Searching...
No Matches
serialization-fwd.hh
Go to the documentation of this file.
1//
2// Copyright (c) 2020 CNRS
3// Authors: Joseph Mirabel
4//
5
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met:
9//
10// 1. Redistributions of source code must retain the above copyright
11// notice, this list of conditions and the following disclaimer.
12//
13// 2. Redistributions in binary form must reproduce the above copyright
14// notice, this list of conditions and the following disclaimer in the
15// documentation and/or other materials provided with the distribution.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
28// DAMAGE.
29
30#ifndef HPP_UTIL_SERIALIZATION_FWD_HH
31#define HPP_UTIL_SERIALIZATION_FWD_HH
32
33#include <boost/serialization/export.hpp>
34#include <boost/serialization/split_free.hpp>
35#include <boost/serialization/split_member.hpp>
36
37namespace boost {
38namespace serialization {
39class access;
40} // namespace serialization
41} // namespace boost
42
47#define HPP_SERIALIZABLE() \
48 friend class boost::serialization::access; \
49 \
50 template <class Archive> \
51 void serialize(Archive& ar, const unsigned int version)
52
58#define HPP_SERIALIZABLE_SPLIT() \
59 BOOST_SERIALIZATION_SPLIT_MEMBER() \
60 friend class boost::serialization::access; \
61 \
62 template <class Archive> \
63 void save(Archive& ar, const unsigned int version) const; \
64 \
65 template <class Archive> \
66 void load(Archive& ar, const unsigned int version)
67
73#define HPP_SERIALIZABLE_FREE(type) \
74 namespace boost { \
75 namespace serialization { \
76 template <class Archive> \
77 void serialize(Archive& ar, type& t, const unsigned int version); \
78 } \
79 }
80
87#define HPP_SERIALIZABLE_SPLIT_FREE(type) HPP_SERIALIZABLE_FREE(type)
88
89#endif // HPP_UTIL_SERIALIZATION_FWD_HH
Definition serialization-fwd.hh:37