os/ossrv/ossrv_pub/boost_apis/boost/serialization/level_enum.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
#ifndef BOOST_SERIALIZATION_LEVEL_ENUM_HPP
sl@0
     2
#define BOOST_SERIALIZATION_LEVEL_ENUM_HPP
sl@0
     3
sl@0
     4
// MS compatible compilers support #pragma once
sl@0
     5
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
sl@0
     6
# pragma once
sl@0
     7
#endif
sl@0
     8
sl@0
     9
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
sl@0
    10
// level_enum.hpp:
sl@0
    11
sl@0
    12
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 
sl@0
    13
// Use, modification and distribution is subject to the Boost Software
sl@0
    14
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
sl@0
    15
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
    16
sl@0
    17
//  See http://www.boost.org for updates, documentation, and revision history.
sl@0
    18
sl@0
    19
namespace boost {
sl@0
    20
namespace serialization {
sl@0
    21
sl@0
    22
// for each class used in the program, specify which level
sl@0
    23
// of serialization should be implemented
sl@0
    24
sl@0
    25
// names for each level
sl@0
    26
enum level_type
sl@0
    27
{
sl@0
    28
    // Don't serialize this type. An attempt to do so should
sl@0
    29
    // invoke a compile time assertion.
sl@0
    30
    not_serializable = 0,
sl@0
    31
    // write/read this type directly to the archive. In this case
sl@0
    32
    // serialization code won't be called.  This is the default
sl@0
    33
    // case for fundamental types.  It presumes a member function or
sl@0
    34
    // template in the archive class that can handle this type.
sl@0
    35
    // there is no runtime overhead associated reading/writing
sl@0
    36
    // instances of this level
sl@0
    37
    primitive_type = 1,
sl@0
    38
    // Serialize the objects of this type using the objects "serialize"
sl@0
    39
    // function or template. This permits values to be written/read
sl@0
    40
    // to/from archives but includes no class or version information. 
sl@0
    41
    object_serializable = 2,
sl@0
    42
    ///////////////////////////////////////////////////////////////////
sl@0
    43
    // once an object is serialized at one of the above levels, the
sl@0
    44
    // corresponding archives cannot be read if the implementation level
sl@0
    45
    // for the archive object is changed.  
sl@0
    46
    ///////////////////////////////////////////////////////////////////
sl@0
    47
    // Add class information to the archive.  Class information includes
sl@0
    48
    // implementation level, class version and class name if available
sl@0
    49
    object_class_info = 3
sl@0
    50
};
sl@0
    51
sl@0
    52
} // namespace serialization
sl@0
    53
} // namespace boost
sl@0
    54
sl@0
    55
#endif // BOOST_SERIALIZATION_LEVEL_ENUM_HPP