Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef  BOOST_ARCHIVE_BASIC_SERIALIZER_HPP
0002 #define BOOST_ARCHIVE_BASIC_SERIALIZER_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_serializer.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 <boost/assert.hpp>
0020 #include <cstddef> // NULL
0021 
0022 #include <boost/noncopyable.hpp>
0023 #include <boost/config.hpp>
0024 #include <boost/serialization/extended_type_info.hpp>
0025 
0026 #ifdef BOOST_MSVC
0027 #  pragma warning(push)
0028 #  pragma warning(disable : 4511 4512)
0029 #endif
0030 
0031 namespace boost {
0032 namespace archive {
0033 namespace detail {
0034 
0035 class basic_serializer :
0036     private boost::noncopyable
0037 {
0038     const boost::serialization::extended_type_info * m_eti;
0039 protected:
0040     explicit basic_serializer(
0041         const boost::serialization::extended_type_info & eti
0042     ) :
0043         m_eti(& eti)
0044     {}
0045 public:
0046     inline bool
0047     operator<(const basic_serializer & rhs) const {
0048         // can't compare address since there can be multiple eti records
0049         // for the same type in different execution modules (that is, DLLS)
0050         // leave this here as a reminder not to do this!
0051         // return & lhs.get_eti() < & rhs.get_eti();
0052         return get_eti() < rhs.get_eti();
0053     }
0054     const char * get_debug_info() const {
0055         return m_eti->get_debug_info();
0056     }
0057     const boost::serialization::extended_type_info & get_eti() const {
0058         return * m_eti;
0059     }
0060 };
0061 
0062 class basic_serializer_arg : public basic_serializer {
0063 public:
0064     basic_serializer_arg(const serialization::extended_type_info & eti) :
0065         basic_serializer(eti)
0066     {}
0067 };
0068 
0069 } // namespace detail
0070 } // namespace archive
0071 } // namespace boost
0072 
0073 #ifdef BOOST_MSVC
0074 #pragma warning(pop)
0075 #endif
0076 
0077 #endif // BOOST_ARCHIVE_BASIC_SERIALIZER_HPP