Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:27

0001 #ifndef BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
0002 #define BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
0003 
0004 // MS compatible compilers support #pragma once
0005 #if defined(_MSC_VER)
0006 # pragma once
0007 #endif
0008 
0009 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
0010 // basic_oserializer.hpp: extension of type_info required for serialization.
0011 
0012 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
0013 // Use, modification and distribution is subject to the Boost Software
0014 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0015 // http://www.boost.org/LICENSE_1_0.txt)
0016 
0017 //  See http://www.boost.org for updates, documentation, and revision history.
0018 
0019 #include <cstddef> // NULL
0020 #include <boost/config.hpp>
0021 #include <boost/noncopyable.hpp>
0022 
0023 #include <boost/archive/basic_archive.hpp>
0024 #include <boost/archive/detail/auto_link_archive.hpp>
0025 #include <boost/archive/detail/basic_serializer.hpp>
0026 
0027 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
0028 
0029 #ifdef BOOST_MSVC
0030 #  pragma warning(push)
0031 #  pragma warning(disable : 4511 4512)
0032 #endif
0033 
0034 namespace boost {
0035 namespace serialization {
0036     class extended_type_info;
0037 } // namespace serialization
0038 
0039 // forward declarations
0040 namespace archive {
0041 namespace detail {
0042 
0043 class basic_oarchive;
0044 class basic_pointer_oserializer;
0045 
0046 class BOOST_SYMBOL_VISIBLE basic_oserializer :
0047     public basic_serializer
0048 {
0049 private:
0050     basic_pointer_oserializer *m_bpos;
0051 protected:
0052     explicit BOOST_ARCHIVE_DECL basic_oserializer(
0053         const boost::serialization::extended_type_info & type_
0054     );
0055     virtual BOOST_ARCHIVE_DECL ~basic_oserializer();
0056 public:
0057     bool serialized_as_pointer() const {
0058         return m_bpos != NULL;
0059     }
0060     void set_bpos(basic_pointer_oserializer *bpos){
0061         m_bpos = bpos;
0062     }
0063     const basic_pointer_oserializer * get_bpos() const {
0064         return m_bpos;
0065     }
0066     virtual void save_object_data(
0067         basic_oarchive & ar, const void * x
0068     ) const = 0;
0069     // returns true if class_info should be saved
0070     virtual bool class_info() const = 0;
0071     // returns true if objects should be tracked
0072     virtual bool tracking(const unsigned int flags) const = 0;
0073     // returns class version
0074     virtual version_type version() const = 0;
0075     // returns true if this class is polymorphic
0076     virtual bool is_polymorphic() const = 0;
0077 };
0078 
0079 } // namespace detail
0080 } // namespace serialization
0081 } // namespace boost
0082 
0083 #ifdef BOOST_MSVC
0084 #pragma warning(pop)
0085 #endif
0086 
0087 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
0088 
0089 #endif // BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP