Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/archive/detail/basic_iserializer.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 #ifndef BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP | |
2 #define BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP | |
3 | |
4 // MS compatible compilers support #pragma once | |
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020) | |
6 # pragma once | |
7 #endif | |
8 | |
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 | |
10 // basic_iserializer.hpp: extenstion of type_info required for serialization. | |
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 <cstdlib> // NULL | |
20 #include <boost/config.hpp> | |
21 | |
22 #include <boost/archive/basic_archive.hpp> | |
23 #include <boost/archive/detail/decl.hpp> | |
24 #include <boost/archive/detail/basic_serializer.hpp> | |
25 #include <boost/archive/detail/auto_link_archive.hpp> | |
26 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header | |
27 | |
28 #ifdef BOOST_MSVC | |
29 # pragma warning(push) | |
30 # pragma warning(disable : 4511 4512) | |
31 #endif | |
32 | |
33 namespace boost { | |
34 namespace serialization { | |
35 class extended_type_info; | |
36 } // namespace serialization | |
37 | |
38 // forward declarations | |
39 namespace archive { | |
40 namespace detail { | |
41 | |
42 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; | |
43 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; | |
44 | |
45 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer : | |
46 public basic_serializer | |
47 { | |
48 private: | |
49 basic_pointer_iserializer *m_bpis; | |
50 protected: | |
51 explicit basic_iserializer( | |
52 const boost::serialization::extended_type_info & type | |
53 ); | |
54 // account for bogus gcc warning | |
55 #if defined(__GNUC__) | |
56 virtual | |
57 #endif | |
58 ~basic_iserializer(); | |
59 public: | |
60 bool serialized_as_pointer() const { | |
61 return m_bpis != NULL; | |
62 } | |
63 void set_bpis(basic_pointer_iserializer *bpis){ | |
64 m_bpis = bpis; | |
65 } | |
66 const basic_pointer_iserializer * get_bpis_ptr() const { | |
67 return m_bpis; | |
68 } | |
69 virtual void load_object_data( | |
70 basic_iarchive & ar, | |
71 void *x, | |
72 const unsigned int file_version | |
73 ) const = 0; | |
74 // returns true if class_info should be saved | |
75 virtual bool class_info() const = 0 ; | |
76 // returns true if objects should be tracked | |
77 virtual bool tracking(const unsigned int) const = 0 ; | |
78 // returns class version | |
79 virtual version_type version() const = 0 ; | |
80 // returns true if this class is polymorphic | |
81 virtual bool is_polymorphic() const = 0; | |
82 virtual void destroy(/*const*/ void *address) const = 0 ; | |
83 }; | |
84 | |
85 } // namespae detail | |
86 } // namespace archive | |
87 } // namespace boost | |
88 | |
89 #ifdef BOOST_MSVC | |
90 #pragma warning(pop) | |
91 #endif | |
92 | |
93 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas | |
94 | |
95 #endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP |