1 #ifndef BOOST_SERIALIZATION_TEST_A_HPP 2 #define BOOST_SERIALIZATION_TEST_A_HPP 3 4 // MS compatible compilers support #pragma once 5 #if defined(_MSC_VER) 6 # pragma once 7 #endif 8 9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 10 // A.hpp simple class test 11 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) 16 17 // See http://www.boost.org for updates, documentation, and revision history. 18 19 #include <ostream> // for friend output operators 20 #include <cstddef> // size_t 21 #include <boost/config.hpp> 22 23 #if defined(BOOST_NO_STDC_NAMESPACE) 24 namespace std{ 25 using ::size_t; 26 } 27 #endif 28 29 #include <boost/limits.hpp> 30 #include <boost/cstdint.hpp> 31 32 #include <boost/serialization/access.hpp> 33 #include <boost/serialization/string.hpp> 34 35 #if defined(A_IMPORT) 36 #define A_DLL_DECL BOOST_SYMBOL_IMPORT 37 #pragma message("A imported") 38 #elif defined(A_EXPORT) 39 #define A_DLL_DECL BOOST_SYMBOL_EXPORT 40 #pragma message ("A exported") 41 #endif 42 43 #ifndef A_DLL_DECL 44 #define A_DLL_DECL 45 #endif 46 47 class A_DLL_DECL A { 48 private: 49 friend class boost::serialization::access; 50 template<class Archive> 51 void serialize( 52 Archive &ar, 53 const unsigned int /* file_version */ 54 ); 55 bool b; 56 #ifndef BOOST_NO_INT64_T 57 boost::int64_t f; 58 boost::uint64_t g; 59 #endif 60 enum h { 61 i = 0, 62 j, 63 k 64 } l; 65 std::size_t m; 66 signed long n; 67 unsigned long o; 68 signed short p; 69 unsigned short q; 70 #ifndef BOOST_NO_CWCHAR 71 wchar_t r; 72 #endif 73 char c; 74 signed char s; 75 unsigned char t; 76 signed int u; 77 unsigned int v; 78 float w; 79 double x; 80 std::string y; 81 #ifndef BOOST_NO_STD_WSTRING 82 std::wstring z; 83 #endif 84 public: 85 A(); 86 bool check_equal(const A &rhs) const; 87 bool operator==(const A &rhs) const; 88 bool operator!=(const A &rhs) const; 89 bool operator<(const A &rhs) const; // used by less 90 // hash function for class A 91 operator std::size_t () const; 92 friend std::ostream & operator<<(std::ostream & os, A const & a); 93 }; 94 95 #endif // BOOST_SERIALIZATION_TEST_A_HPP 96