1 #ifndef BOOST_ARCHIVE_BASIC_SERIALIZER_HPP
2 #define BOOST_ARCHIVE_BASIC_SERIALIZER_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // basic_serializer.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 <boost/assert.hpp>
20 #include <cstddef> // NULL
22 #include <boost/noncopyable.hpp>
23 #include <boost/config.hpp>
24 #include <boost/serialization/extended_type_info.hpp>
27 # pragma warning(push)
28 # pragma warning(disable : 4511 4512)
35 class basic_serializer :
36 private boost::noncopyable
38 const boost::serialization::extended_type_info * m_eti;
40 explicit basic_serializer(
41 const boost::serialization::extended_type_info & eti
47 operator<(const basic_serializer & rhs) const {
48 // can't compare address since there can be multiple eti records
49 // for the same type in different execution modules (that is, DLLS)
50 // leave this here as a reminder not to do this!
51 // return & lhs.get_eti() < & rhs.get_eti();
52 return get_eti() < rhs.get_eti();
54 const char * get_debug_info() const {
55 return m_eti->get_debug_info();
57 const boost::serialization::extended_type_info & get_eti() const {
62 class basic_serializer_arg : public basic_serializer {
64 basic_serializer_arg(const serialization::extended_type_info & eti) :
70 } // namespace archive
77 #endif // BOOST_ARCHIVE_BASIC_SERIALIZER_HPP