Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
0002 #define BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_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_iserializer.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 <cstdlib> // NULL
0020 #include <boost/config.hpp>
0021 
0022 #include <boost/archive/basic_archive.hpp>
0023 #include <boost/archive/detail/decl.hpp>
0024 #include <boost/archive/detail/basic_serializer.hpp>
0025 #include <boost/archive/detail/auto_link_archive.hpp>
0026 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
0027 
0028 #ifdef BOOST_MSVC
0029 #  pragma warning(push)
0030 #  pragma warning(disable : 4511 4512)
0031 #endif
0032 
0033 namespace boost {
0034 namespace serialization {
0035     class extended_type_info;
0036 } // namespace serialization
0037 
0038 // forward declarations
0039 namespace archive {
0040 namespace detail {
0041 
0042 class basic_iarchive;
0043 class basic_pointer_iserializer;
0044 
0045 class BOOST_SYMBOL_VISIBLE basic_iserializer :
0046     public basic_serializer
0047 {
0048 private:
0049     basic_pointer_iserializer *m_bpis;
0050 protected:
0051     explicit BOOST_ARCHIVE_DECL basic_iserializer(
0052         const boost::serialization::extended_type_info & type
0053     );
0054     virtual BOOST_ARCHIVE_DECL ~basic_iserializer();
0055 public:
0056     bool serialized_as_pointer() const {
0057         return m_bpis != NULL;
0058     }
0059     void set_bpis(basic_pointer_iserializer *bpis){
0060         m_bpis = bpis;
0061     }
0062     const basic_pointer_iserializer * get_bpis_ptr() const {
0063         return m_bpis;
0064     }
0065     virtual void load_object_data(
0066         basic_iarchive & ar,
0067         void *x,
0068         const unsigned int file_version
0069     ) const = 0;
0070     // returns true if class_info should be saved
0071     virtual bool class_info() const = 0 ;
0072     // returns true if objects should be tracked
0073     virtual bool tracking(const unsigned int) const = 0 ;
0074     // returns class version
0075     virtual version_type version() const = 0 ;
0076     // returns true if this class is polymorphic
0077     virtual bool is_polymorphic() const = 0;
0078     virtual void destroy(/*const*/ void *address) const = 0 ;
0079 };
0080 
0081 } // namespace detail
0082 } // namespace archive
0083 } // namespace boost
0084 
0085 #ifdef BOOST_MSVC
0086 #pragma warning(pop)
0087 #endif
0088 
0089 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
0090 
0091 #endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP