~ubuntu-branches/ubuntu/trusty/deal.ii/trusty

« back to all changes in this revision

Viewing changes to contrib/boost/include/boost/archive/text_oarchive.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV, Adam C. Powell, IV, Denis Barbier
  • Date: 2010-07-29 13:47:01 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100729134701-akb8jb3stwge8tcm
Tags: 6.3.1-1
[ Adam C. Powell, IV ]
* Changed to source format 3.0 (quilt).
* Changed maintainer to debian-science with Adam Powell as uploader.
* Added source lintian overrides about Adam Powell's name.
* Added Vcs info on git repository.
* Bumped Standards-Version.
* Changed stamp-patch to patch target and fixed its application criterion.
* Moved make_dependencies and expand_instantiations to a versioned directory
  to avoid shlib package conflicts.

[ Denis Barbier ]
* New upstream release (closes: #562332).
  + Added libtbb support.
  + Forward-ported all patches.
* Updates for new PETSc version, including workaround for different versions
  of petsc and slepc.
* Add debian/watch.
* Update to debhelper 7.
* Added pdebuild patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef BOOST_ARCHIVE_TEXT_OARCHIVE_HPP
 
2
#define BOOST_ARCHIVE_TEXT_OARCHIVE_HPP
 
3
 
 
4
// MS compatible compilers support #pragma once
 
5
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
 
6
# pragma once
 
7
#endif
 
8
 
 
9
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 
10
// text_oarchive.hpp
 
11
 
 
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)
 
16
 
 
17
//  See http://www.boost.org for updates, documentation, and revision history.
 
18
 
 
19
#include <ostream>
 
20
#include <cstddef> // std::size_t
 
21
 
 
22
#include <boost/config.hpp>
 
23
#if defined(BOOST_NO_STDC_NAMESPACE)
 
24
namespace std{ 
 
25
    using ::size_t; 
 
26
} // namespace std
 
27
#endif
 
28
 
 
29
#include <boost/archive/detail/auto_link_archive.hpp>
 
30
#include <boost/archive/basic_text_oprimitive.hpp>
 
31
#include <boost/archive/basic_text_oarchive.hpp>
 
32
#include <boost/archive/detail/register_archive.hpp>
 
33
 
 
34
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
35
 
 
36
namespace boost { 
 
37
namespace archive {
 
38
 
 
39
template<class Archive>
 
40
class text_oarchive_impl : 
 
41
     /* protected ? */ public basic_text_oprimitive<std::ostream>,
 
42
     public basic_text_oarchive<Archive>
 
43
{
 
44
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
 
45
public:
 
46
#else
 
47
    friend class detail::interface_oarchive<Archive>;
 
48
    friend class basic_text_oarchive<Archive>;
 
49
    friend class save_access;
 
50
protected:
 
51
#endif
 
52
    template<class T>
 
53
    void save(const T & t){
 
54
        this->newtoken();
 
55
        basic_text_oprimitive<std::ostream>::save(t);
 
56
    }
 
57
    BOOST_ARCHIVE_DECL(void) 
 
58
    save(const char * t);
 
59
    #ifndef BOOST_NO_INTRINSIC_WCHAR_T
 
60
    BOOST_ARCHIVE_DECL(void) 
 
61
    save(const wchar_t * t);
 
62
    #endif
 
63
    BOOST_ARCHIVE_DECL(void) 
 
64
    save(const std::string &s);
 
65
    #ifndef BOOST_NO_STD_WSTRING
 
66
    BOOST_ARCHIVE_DECL(void) 
 
67
    save(const std::wstring &ws);
 
68
    #endif
 
69
    BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) 
 
70
    text_oarchive_impl(std::ostream & os, unsigned int flags);
 
71
    BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) 
 
72
    ~text_oarchive_impl(){};
 
73
public:
 
74
    BOOST_ARCHIVE_DECL(void) 
 
75
    save_binary(const void *address, std::size_t count);
 
76
};
 
77
 
 
78
// do not derive from this class.  If you want to extend this functionality
 
79
// via inhertance, derived from text_oarchive_impl instead.  This will
 
80
// preserve correct static polymorphism.
 
81
class text_oarchive : 
 
82
    public text_oarchive_impl<text_oarchive>
 
83
{
 
84
public:
 
85
     
 
86
    text_oarchive(std::ostream & os_, unsigned int flags = 0) :
 
87
        // note: added _ to suppress useless gcc warning
 
88
        text_oarchive_impl<text_oarchive>(os_, flags)
 
89
    {}
 
90
    ~text_oarchive(){}
 
91
};
 
92
 
 
93
typedef text_oarchive naked_text_oarchive;
 
94
 
 
95
} // namespace archive
 
96
} // namespace boost
 
97
 
 
98
// required by export
 
99
BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_oarchive)
 
100
 
 
101
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
102
 
 
103
#endif // BOOST_ARCHIVE_TEXT_OARCHIVE_HPP