1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/archive/basic_archive.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,130 @@
1.4 +#ifndef BOOST_ARCHIVE_BASIC_ARCHIVE_HPP
1.5 +#define BOOST_ARCHIVE_BASIC_ARCHIVE_HPP
1.6 +
1.7 +// MS compatible compilers support #pragma once
1.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
1.9 +# pragma once
1.10 +#endif
1.11 +
1.12 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
1.13 +// basic_archive.hpp:
1.14 +
1.15 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
1.16 +// Use, modification and distribution is subject to the Boost Software
1.17 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.18 +// http://www.boost.org/LICENSE_1_0.txt)
1.19 +
1.20 +// See http://www.boost.org for updates, documentation, and revision history.
1.21 +
1.22 +#include <boost/config.hpp>
1.23 +#include <boost/strong_typedef.hpp>
1.24 +#include <boost/noncopyable.hpp>
1.25 +
1.26 +#include <boost/archive/detail/auto_link_archive.hpp>
1.27 +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
1.28 +
1.29 +namespace boost {
1.30 +namespace archive {
1.31 +
1.32 +BOOST_STRONG_TYPEDEF(unsigned int, version_type)
1.33 +BOOST_STRONG_TYPEDEF(int, class_id_type)
1.34 +BOOST_STRONG_TYPEDEF(int, class_id_optional_type)
1.35 +BOOST_STRONG_TYPEDEF(int, class_id_reference_type)
1.36 +BOOST_STRONG_TYPEDEF(unsigned int, object_id_type)
1.37 +BOOST_STRONG_TYPEDEF(unsigned int, object_reference_type)
1.38 +
1.39 +struct tracking_type {
1.40 + typedef bool value_type;
1.41 + bool t;
1.42 + explicit tracking_type(const bool t_ = false)
1.43 + : t(t_)
1.44 + {};
1.45 + tracking_type(const tracking_type & t_)
1.46 + : t(t_.t)
1.47 + {}
1.48 + operator bool () const {
1.49 + return t;
1.50 + };
1.51 + operator bool & () {
1.52 + return t;
1.53 + };
1.54 + tracking_type & operator=(const bool t_){
1.55 + t = t_;
1.56 + return *this;
1.57 + }
1.58 + bool operator==(const tracking_type & rhs) const {
1.59 + return t == rhs.t;
1.60 + }
1.61 + bool operator==(const bool & rhs) const {
1.62 + return t == rhs;
1.63 + }
1.64 + tracking_type & operator=(const tracking_type & rhs){
1.65 + t = rhs.t;
1.66 + return *this;
1.67 + }
1.68 +};
1.69 +
1.70 +struct class_name_type : private boost::noncopyable {
1.71 + char *t;
1.72 + operator const char * & () const {
1.73 + return const_cast<const char * &>(t);
1.74 + }
1.75 + operator char * () {
1.76 + return t;
1.77 + }
1.78 + explicit class_name_type(const char *key_)
1.79 + : t(const_cast<char *>(key_)){}
1.80 + explicit class_name_type(char *key_)
1.81 + : t(key_){}
1.82 + class_name_type & operator=(const class_name_type & rhs){
1.83 + t = rhs.t;
1.84 + return *this;
1.85 + }
1.86 +};
1.87 +
1.88 +enum archive_flags {
1.89 + no_header = 1, // suppress archive header info
1.90 + no_codecvt = 2, // suppress alteration of codecvt facet
1.91 + no_xml_tag_checking = 4, // suppress checking of xml tags
1.92 + no_tracking = 8 // suppress ALL tracking
1.93 +// no_object_creation = 16 // don't create any new objects
1.94 +};
1.95 +
1.96 +#define NULL_POINTER_TAG class_id_type(-1)
1.97 +
1.98 +BOOST_ARCHIVE_DECL(const char *)
1.99 +ARCHIVE_SIGNATURE();
1.100 +
1.101 +BOOST_ARCHIVE_DECL(unsigned char)
1.102 +ARCHIVE_VERSION();
1.103 +
1.104 +}// namespace archive
1.105 +}// namespace boost
1.106 +
1.107 +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
1.108 +
1.109 +#include <boost/serialization/level.hpp>
1.110 +
1.111 +// set implementation level to primitive for all types
1.112 +// used internally by the serialization library
1.113 +
1.114 +BOOST_CLASS_IMPLEMENTATION(boost::archive::version_type, primitive_type)
1.115 +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_type, primitive_type)
1.116 +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_reference_type, primitive_type)
1.117 +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_optional_type, primitive_type)
1.118 +BOOST_CLASS_IMPLEMENTATION(boost::archive::class_name_type, primitive_type)
1.119 +BOOST_CLASS_IMPLEMENTATION(boost::archive::object_id_type, primitive_type)
1.120 +BOOST_CLASS_IMPLEMENTATION(boost::archive::object_reference_type, primitive_type)
1.121 +BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type)
1.122 +
1.123 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
1.124 +// Make sure that the export.hpp header isn't included before any archive header
1.125 +// Doing so would inhibit construction of correct mpl list of known archive
1.126 +// types which in turn would inhibit instantiation of all combinations of
1.127 +// serialization/archive types.
1.128 +
1.129 +#ifdef BOOST_SERIALIZATION_EXPORT_HPP
1.130 +#error "export.hpp must not be included before any archive header"
1.131 +#endif
1.132 +
1.133 +#endif //BOOST_ARCHIVE_BASIC_ARCHIVE_HPP