1 #ifndef BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
2 #define BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // basic_oserializer.hpp: extenstion of type_info required for serialization.
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 <cstddef> // NULL
20 #include <boost/config.hpp>
21 #include <boost/noncopyable.hpp>
23 #include <boost/archive/basic_archive.hpp>
24 #include <boost/archive/detail/auto_link_archive.hpp>
25 #include <boost/archive/detail/basic_serializer.hpp>
27 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
30 # pragma warning(push)
31 # pragma warning(disable : 4511 4512)
35 namespace serialization {
36 class extended_type_info;
37 } // namespace serialization
39 // forward declarations
44 class basic_pointer_oserializer;
46 class BOOST_SYMBOL_VISIBLE basic_oserializer :
47 public basic_serializer
50 basic_pointer_oserializer *m_bpos;
52 explicit BOOST_ARCHIVE_DECL basic_oserializer(
53 const boost::serialization::extended_type_info & type_
55 virtual BOOST_ARCHIVE_DECL ~basic_oserializer();
57 bool serialized_as_pointer() const {
58 return m_bpos != NULL;
60 void set_bpos(basic_pointer_oserializer *bpos){
63 const basic_pointer_oserializer * get_bpos() const {
66 virtual void save_object_data(
67 basic_oarchive & ar, const void * x
69 // returns true if class_info should be saved
70 virtual bool class_info() const = 0;
71 // returns true if objects should be tracked
72 virtual bool tracking(const unsigned int flags) const = 0;
73 // returns class version
74 virtual version_type version() const = 0;
75 // returns true if this class is polymorphic
76 virtual bool is_polymorphic() const = 0;
80 } // namespace serialization
87 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
89 #endif // BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP