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