File indexing completed on 2025-01-18 09:28:27
0001 #ifndef BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP
0002 #define BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP
0003
0004
0005 #if defined(_MSC_VER)
0006 # pragma once
0007 #endif
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <boost/config.hpp>
0020
0021 #include <boost/archive/detail/basic_oarchive.hpp>
0022 #include <boost/archive/detail/interface_oarchive.hpp>
0023
0024 #ifdef BOOST_MSVC
0025 # pragma warning(push)
0026 # pragma warning(disable : 4511 4512)
0027 #endif
0028
0029 namespace boost {
0030 namespace archive {
0031 namespace detail {
0032
0033
0034 template<class Archive>
0035
0036 class BOOST_SYMBOL_VISIBLE common_oarchive :
0037 public basic_oarchive,
0038 public interface_oarchive<Archive>
0039 {
0040 friend class interface_oarchive<Archive>;
0041 friend class basic_oarchive;
0042 private:
0043 void vsave(const version_type t) BOOST_OVERRIDE {
0044 * this->This() << t;
0045 }
0046 void vsave(const object_id_type t) BOOST_OVERRIDE {
0047 * this->This() << t;
0048 }
0049 void vsave(const object_reference_type t) BOOST_OVERRIDE {
0050 * this->This() << t;
0051 }
0052 void vsave(const class_id_type t) BOOST_OVERRIDE {
0053 * this->This() << t;
0054 }
0055 void vsave(const class_id_reference_type t) BOOST_OVERRIDE {
0056 * this->This() << t;
0057 }
0058 void vsave(const class_id_optional_type t) BOOST_OVERRIDE {
0059 * this->This() << t;
0060 }
0061 void vsave(const class_name_type & t) BOOST_OVERRIDE {
0062 * this->This() << t;
0063 }
0064 void vsave(const tracking_type t) BOOST_OVERRIDE {
0065 * this->This() << t;
0066 }
0067 protected:
0068
0069 template<class T>
0070 void save_override(T & t){
0071 archive::save(* this->This(), t);
0072 }
0073 void save_start(const char * ){}
0074 void save_end(const char * ){}
0075 common_oarchive(unsigned int flags = 0) :
0076 basic_oarchive(flags),
0077 interface_oarchive<Archive>()
0078 {}
0079 };
0080
0081 }
0082 }
0083 }
0084
0085 #ifdef BOOST_MSVC
0086 #pragma warning(pop)
0087 #endif
0088
0089 #endif