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

« back to all changes in this revision

Viewing changes to contrib/boost/include/boost/archive/detail/common_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_DETAIL_COMMON_OARCHIVE_HPP
 
2
#define BOOST_ARCHIVE_DETAIL_COMMON_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
// common_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 <boost/archive/detail/basic_oarchive.hpp>
 
20
#include <boost/archive/detail/interface_oarchive.hpp>
 
21
 
 
22
namespace boost {
 
23
namespace archive {
 
24
namespace detail {
 
25
 
 
26
// note: referred to as Curiously Recurring Template Patter (CRTP)
 
27
template<class Archive>
 
28
class common_oarchive : 
 
29
    public basic_oarchive,
 
30
    public interface_oarchive<Archive>
 
31
{
 
32
    friend class interface_oarchive<Archive>;
 
33
private:
 
34
    virtual void vsave(const version_type t){
 
35
        * this->This() << t;
 
36
    }
 
37
    virtual void vsave(const object_id_type t){
 
38
        * this->This() << t;
 
39
    }
 
40
    virtual void vsave(const object_reference_type t){
 
41
        * this->This() << t;
 
42
    }
 
43
    virtual void vsave(const class_id_type t){
 
44
        * this->This() << t;
 
45
    }
 
46
    virtual void vsave(const class_id_reference_type t){
 
47
        * this->This() << t;
 
48
    }
 
49
    virtual void vsave(const class_id_optional_type t){
 
50
        * this->This() << t;
 
51
    }
 
52
    virtual void vsave(const class_name_type & t){
 
53
        * this->This() << t;
 
54
    }
 
55
    virtual void vsave(const tracking_type t){
 
56
        * this->This() << t;
 
57
    }
 
58
protected:
 
59
    // default processing - invoke serialization library
 
60
    template<class T>
 
61
    void save_override(T & t, BOOST_PFTO int){
 
62
        archive::save(* this->This(), t);
 
63
    }
 
64
    void save_start(const char * /*name*/){}
 
65
    void save_end(const char * /*name*/){}
 
66
    common_oarchive(unsigned int flags = 0) : 
 
67
        basic_oarchive(flags),
 
68
        interface_oarchive<Archive>()
 
69
    {}
 
70
};
 
71
 
 
72
} // namespace detail
 
73
} // namespace archive
 
74
} // namespace boost
 
75
 
 
76
#endif // BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP