Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/archive/detail/basic_oserializer.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_SERIALIZATION_BASIC_OSERIALIZER_HPP | |
2 #define BOOST_SERIALIZATION_BASIC_OSERIALIZER_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_oserializer.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 <cstddef> // NULL | |
20 #include <boost/config.hpp> | |
21 #include <boost/noncopyable.hpp> | |
22 | |
23 #include <boost/archive/basic_archive.hpp> | |
24 #include <boost/archive/detail/auto_link_archive.hpp> | |
25 #include <boost/archive/detail/basic_serializer.hpp> | |
26 | |
27 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header | |
28 | |
29 #ifdef BOOST_MSVC | |
30 # pragma warning(push) | |
31 # pragma warning(disable : 4511 4512) | |
32 #endif | |
33 | |
34 namespace boost { | |
35 namespace serialization { | |
36 class extended_type_info; | |
37 } // namespace serialization | |
38 | |
39 // forward declarations | |
40 namespace archive { | |
41 namespace detail { | |
42 | |
43 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; | |
44 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; | |
45 | |
46 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer : | |
47 public basic_serializer | |
48 { | |
49 private: | |
50 basic_pointer_oserializer *m_bpos; | |
51 protected: | |
52 explicit basic_oserializer( | |
53 const boost::serialization::extended_type_info & type_ | |
54 ); | |
55 // account for bogus gcc warning | |
56 #if defined(__GNUC__) | |
57 virtual | |
58 #endif | |
59 ~basic_oserializer(); | |
60 public: | |
61 bool serialized_as_pointer() const { | |
62 return m_bpos != NULL; | |
63 } | |
64 void set_bpos(basic_pointer_oserializer *bpos){ | |
65 m_bpos = bpos; | |
66 } | |
67 const basic_pointer_oserializer * get_bpos() const { | |
68 return m_bpos; | |
69 } | |
70 virtual void save_object_data( | |
71 basic_oarchive & ar, const void * x | |
72 ) const = 0; | |
73 // returns true if class_info should be saved | |
74 virtual bool class_info() const = 0; | |
75 // returns true if objects should be tracked | |
76 virtual bool tracking(const unsigned int flags) const = 0; | |
77 // returns class version | |
78 virtual version_type version() const = 0; | |
79 // returns true if this class is polymorphic | |
80 virtual bool is_polymorphic() const = 0; | |
81 }; | |
82 | |
83 } // namespace detail | |
84 } // namespace serialization | |
85 } // namespace boost | |
86 | |
87 #ifdef BOOST_MSVC | |
88 #pragma warning(pop) | |
89 #endif | |
90 | |
91 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas | |
92 | |
93 #endif // BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP |