1 #ifndef BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
2 #define BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // common_iarchive.hpp
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/config.hpp>
21 #include <boost/archive/detail/basic_iarchive.hpp>
22 #include <boost/archive/detail/basic_pointer_iserializer.hpp>
23 #include <boost/archive/detail/interface_iarchive.hpp>
26 # pragma warning(push)
27 # pragma warning(disable : 4511 4512)
34 class extended_type_info;
36 // note: referred to as Curiously Recurring Template Patter (CRTP)
37 template<class Archive>
38 class BOOST_SYMBOL_VISIBLE common_iarchive :
39 public basic_iarchive,
40 public interface_iarchive<Archive>
42 friend class interface_iarchive<Archive>;
44 virtual void vload(version_type & t){
47 virtual void vload(object_id_type & t){
50 virtual void vload(class_id_type & t){
53 virtual void vload(class_id_optional_type & t){
56 virtual void vload(tracking_type & t){
59 virtual void vload(class_name_type &s){
63 // default processing - invoke serialization library
65 void load_override(T & t){
66 archive::load(* this->This(), t);
68 // default implementations of functions which emit start/end tags for
69 // archive types that require them.
70 void load_start(const char * /*name*/){}
71 void load_end(const char * /*name*/){}
72 // default archive initialization
73 common_iarchive(unsigned int flags = 0) :
74 basic_iarchive(flags),
75 interface_iarchive<Archive>()
80 } // namespace archive
87 #endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP