1 #ifndef BOOST_SERIALIZATION_TEST_A_HPP
2 #define BOOST_SERIALIZATION_TEST_A_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // A.hpp simple class test
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 #include <ostream> // for friend output operators
20 #include <cstddef> // size_t
22 #include <boost/config.hpp>
23 #if defined(BOOST_NO_STDC_NAMESPACE)
29 #include <boost/detail/workaround.hpp>
30 #include <boost/limits.hpp>
31 #include <boost/cstdint.hpp>
33 #include <boost/serialization/access.hpp>
35 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
36 #include <boost/detail/workaround.hpp>
37 #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
38 #include <boost/archive/dinkumware.hpp>
42 #include <boost/serialization/nvp.hpp>
43 #include <boost/serialization/string.hpp>
45 #include <boost/preprocessor/facilities/empty.hpp>
48 #define DLL_DECL BOOST_SYMBOL_IMPORT
49 #elif defined(A_EXPORT)
50 #define DLL_DECL BOOST_SYMBOL_EXPORT
58 friend class boost::serialization::access;
59 // note: from an aesthetic perspective, I would much prefer to have this
60 // defined out of line. Unfortunately, this trips a bug in the VC 6.0
61 // compiler. So hold our nose and put it her to permit running of tests.
62 // mscvc 6.0 requires template functions to be implemented. For this
63 // reason we can't make abstract.
64 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
65 template<class Archive>
68 const unsigned int /* file_version */
70 ar & BOOST_SERIALIZATION_NVP(b);
71 #ifndef BOOST_NO_INT64_T
72 ar & BOOST_SERIALIZATION_NVP(f);
73 ar & BOOST_SERIALIZATION_NVP(g);
75 #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 )
77 if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){
79 ar & BOOST_SERIALIZATION_NVP(i);
82 ar & BOOST_SERIALIZATION_NVP(i);
86 ar & BOOST_SERIALIZATION_NVP(l);
88 ar & BOOST_SERIALIZATION_NVP(m);
89 ar & BOOST_SERIALIZATION_NVP(n);
90 ar & BOOST_SERIALIZATION_NVP(o);
91 ar & BOOST_SERIALIZATION_NVP(p);
92 ar & BOOST_SERIALIZATION_NVP(q);
93 #ifndef BOOST_NO_CWCHAR
94 ar & BOOST_SERIALIZATION_NVP(r);
96 ar & BOOST_SERIALIZATION_NVP(c);
97 ar & BOOST_SERIALIZATION_NVP(s);
98 ar & BOOST_SERIALIZATION_NVP(t);
99 ar & BOOST_SERIALIZATION_NVP(u);
100 ar & BOOST_SERIALIZATION_NVP(v);
101 ar & BOOST_SERIALIZATION_NVP(w);
102 ar & BOOST_SERIALIZATION_NVP(x);
103 ar & BOOST_SERIALIZATION_NVP(y);
104 #ifndef BOOST_NO_STD_WSTRING
105 ar & BOOST_SERIALIZATION_NVP(z);
109 template<class Archive>
112 const unsigned int /* file_version */
116 #ifndef BOOST_NO_INT64_T
130 #ifndef BOOST_NO_CWCHAR
141 #ifndef BOOST_NO_STD_WSTRING
146 bool check_equal(const A &rhs) const;
147 bool operator==(const A &rhs) const;
148 bool operator!=(const A &rhs) const;
149 bool operator<(const A &rhs) const; // used by less
150 // hash function for class A
151 operator std::size_t () const;
152 friend std::ostream & operator<<(std::ostream & os, A const & a);
157 #endif // BOOST_SERIALIZATION_TEST_A_HPP