diff options
Diffstat (limited to '3rdParty/Boost/src/boost/serialization')
20 files changed, 1749 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/serialization/access.hpp b/3rdParty/Boost/src/boost/serialization/access.hpp new file mode 100644 index 0000000..40256d6 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/access.hpp @@ -0,0 +1,147 @@ +#ifndef BOOST_SERIALIZATION_ACCESS_HPP +#define BOOST_SERIALIZATION_ACCESS_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// access.hpp: interface for serialization system. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <boost/config.hpp> + +#include <boost/serialization/pfto.hpp> + +namespace boost { + +namespace archive { +namespace detail { + template<class Archive, class T> + class iserializer; + template<class Archive, class T> + class oserializer; +} // namespace detail +} // namespace archive + +namespace serialization { + +// forward declarations +template<class Archive, class T> +inline void serialize_adl(Archive &, T &, const unsigned int); +namespace detail { + template<class Archive, class T> + struct member_saver; + template<class Archive, class T> + struct member_loader; +} // namespace detail + +// use an "accessor class so that we can use: +// "friend class boost::serialization::access;" +// in any serialized class to permit clean, safe access to private class members +// by the serialization system + +class access { +public: + // grant access to "real" serialization defaults +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + template<class Archive, class T> + friend struct detail::member_saver; + template<class Archive, class T> + friend struct detail::member_loader; + template<class Archive, class T> + friend class archive::detail::iserializer; + template<class Archive, class T> + friend class archive::detail::oserializer; + template<class Archive, class T> + friend inline void serialize( + Archive & ar, + T & t, + const BOOST_PFTO unsigned int file_version + ); + template<class Archive, class T> + friend inline void save_construct_data( + Archive & ar, + const T * t, + const BOOST_PFTO unsigned int file_version + ); + template<class Archive, class T> + friend inline void load_construct_data( + Archive & ar, + T * t, + const BOOST_PFTO unsigned int file_version + ); +#endif + + // pass calls to users's class implementation + template<class Archive, class T> + static void member_save( + Archive & ar, + //const T & t, + T & t, + const unsigned int file_version + ){ + t.save(ar, file_version); + } + template<class Archive, class T> + static void member_load( + Archive & ar, + T & t, + const unsigned int file_version + ){ + t.load(ar, file_version); + } + template<class Archive, class T> + static void serialize( + Archive & ar, + T & t, + const unsigned int file_version + ){ + // note: if you get a compile time error here with a + // message something like: + // cannot convert parameter 1 from <file type 1> to <file type 2 &> + // a likely possible cause is that the class T contains a + // serialize function - but that serialize function isn't + // a template and corresponds to a file type different than + // the class Archive. To resolve this, don't include an + // archive type other than that for which the serialization + // function is defined!!! + t.serialize(ar, file_version); + } + template<class T> + static void destroy( const T * t) // const appropriate here? + { + // the const business is an MSVC 6.0 hack that should be + // benign on everything else + delete const_cast<T *>(t); + } + template<class T> + static void construct(T * t){ + // default is inplace invocation of default constructor + // Note the :: before the placement new. Required if the + // class doesn't have a class-specific placement new defined. + ::new(t)T; + } + template<class T, class U> + static T & cast_reference(U & u){ + return static_cast<T &>(u); + } + template<class T, class U> + static T * cast_pointer(U * u){ + return static_cast<T *>(u); + } +}; + +} // namespace serialization +} // namespace boost + +#endif // BOOST_SERIALIZATION_ACCESS_HPP diff --git a/3rdParty/Boost/src/boost/serialization/base_object.hpp b/3rdParty/Boost/src/boost/serialization/base_object.hpp new file mode 100644 index 0000000..b840d25 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/base_object.hpp @@ -0,0 +1,112 @@ +#ifndef BOOST_SERIALIZATION_BASE_OBJECT_HPP +#define BOOST_SERIALIZATION_BASE_OBJECT_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// base_object.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// if no archive headers have been included this is a no op +// this is to permit BOOST_EXPORT etc to be included in a +// file declaration header + +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> + +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/identity.hpp> + +#include <boost/type_traits/is_base_and_derived.hpp> +#include <boost/type_traits/is_pointer.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/is_polymorphic.hpp> + +#include <boost/static_assert.hpp> +#include <boost/serialization/access.hpp> +#include <boost/serialization/force_include.hpp> +#include <boost/serialization/void_cast_fwd.hpp> + +namespace boost { +namespace serialization { + +namespace detail +{ + // get the base type for a given derived type + // preserving the const-ness + template<class B, class D> + struct base_cast + { + typedef BOOST_DEDUCED_TYPENAME + mpl::if_< + is_const<D>, + const B, + B + >::type type; + BOOST_STATIC_ASSERT(is_const<type>::value == is_const<D>::value); + }; + + // only register void casts if the types are polymorphic + template<class Base, class Derived> + struct base_register + { + struct polymorphic { + static void const * invoke(){ + Base const * const b = 0; + Derived const * const d = 0; + return & void_cast_register(d, b); + } + }; + struct non_polymorphic { + static void const * invoke(){ + return 0; + } + }; + static void const * invoke(){ + typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_polymorphic<Base>, + mpl::identity<polymorphic>, + mpl::identity<non_polymorphic> + >::type type; + return type::invoke(); + } + }; + +} // namespace detail +#if defined(__BORLANDC__) && __BORLANDC__ < 0x610 +template<class Base, class Derived> +const Base & +base_object(const Derived & d) +{ + BOOST_STATIC_ASSERT(! is_pointer<Derived>::value); + detail::base_register<Base, Derived>::invoke(); + return access::cast_reference<const Base, Derived>(d); +} +#else +template<class Base, class Derived> +BOOST_DEDUCED_TYPENAME detail::base_cast<Base, Derived>::type & +base_object(Derived &d) +{ + BOOST_STATIC_ASSERT(( is_base_and_derived<Base,Derived>::value)); + BOOST_STATIC_ASSERT(! is_pointer<Derived>::value); + typedef BOOST_DEDUCED_TYPENAME detail::base_cast<Base, Derived>::type type; + detail::base_register<type, Derived>::invoke(); + return access::cast_reference<type, Derived>(d); +} +#endif + +} // namespace serialization +} // namespace boost + +#endif // BOOST_SERIALIZATION_BASE_OBJECT_HPP diff --git a/3rdParty/Boost/src/boost/serialization/collection_size_type.hpp b/3rdParty/Boost/src/boost/serialization/collection_size_type.hpp new file mode 100644 index 0000000..2dd8fa7 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/collection_size_type.hpp @@ -0,0 +1,62 @@ +#ifndef BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP +#define BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP + +// (C) Copyright 2005 Matthias Troyer +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <cstddef> // size_t +#include <boost/serialization/strong_typedef.hpp> +#include <boost/serialization/level.hpp> +#include <boost/serialization/split_free.hpp> +#include <boost/serialization/is_bitwise_serializable.hpp> + +namespace boost { +namespace serialization { + +//BOOST_STRONG_TYPEDEF(std::size_t, collection_size_type) + +class collection_size_type { +private: + typedef std::size_t base_type; + base_type t; +public: + collection_size_type(): t(0) {}; + explicit collection_size_type(const std::size_t & t_) : + t(t_) + {} + collection_size_type(const collection_size_type & t_) : + t(t_.t) + {} + collection_size_type & operator=(const collection_size_type & rhs){ + t = rhs.t; + return *this; + } + collection_size_type & operator=(const unsigned int & rhs){ + t = rhs; + return *this; + } + // used for text output + operator base_type () const { + return t; + } + // used for text input + operator base_type & () { + return t; + } + bool operator==(const collection_size_type & rhs) const { + return t == rhs.t; + } + bool operator<(const collection_size_type & rhs) const { + return t < rhs.t; + } +}; + + +} } // end namespace boost::serialization + +BOOST_CLASS_IMPLEMENTATION(collection_size_type, primitive_type) +BOOST_IS_BITWISE_SERIALIZABLE(collection_size_type) + +#endif //BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP diff --git a/3rdParty/Boost/src/boost/serialization/force_include.hpp b/3rdParty/Boost/src/boost/serialization/force_include.hpp new file mode 100644 index 0000000..a18a8a1 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/force_include.hpp @@ -0,0 +1,59 @@ +#ifndef BOOST_SERIALIZATION_FORCE_INCLUDE_HPP +#define BOOST_SERIALIZATION_FORCE_INCLUDE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// force_include.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <boost/config.hpp> + +// the following help macro is to guarentee that certain coded +// is not removed by over-eager linker optimiser. In certain cases +// we create static objects must be created but are actually never +// referenced - creation has a side-effect such as global registration +// which is important to us. We make an effort to refer these objects +// so that a smart linker won't remove them as being unreferenced. +// In microsoft compilers, inlining the code that does the referring +// means the code gets lost and the static object is not included +// in the library and hence never registered. This manifests itself +// in an ungraceful crash at runtime when (and only when) built in +// release mode. + +#if defined(BOOST_HAS_DECLSPEC) && !defined(__COMO__) +# if defined(__BORLANDC__) +# define BOOST_DLLEXPORT __export +# else +# define BOOST_DLLEXPORT __declspec(dllexport) +# endif +#elif ! defined(_WIN32) && ! defined(_WIN64) +# if defined(__MWERKS__) +# define BOOST_DLLEXPORT __declspec(dllexport) +# elif defined(__GNUC__) && (__GNUC__ >= 3) +# define BOOST_USED __attribute__ ((used)) +# elif defined(__IBMCPP__) && (__IBMCPP__ >= 1110) +# define BOOST_USED __attribute__ ((used)) +# elif defined(__INTEL_COMPILER) && (BOOST_INTEL_CXX_VERSION >= 800) +# define BOOST_USED __attribute__ ((used)) +# endif +#endif + +#ifndef BOOST_USED +# define BOOST_USED +#endif + +#ifndef BOOST_DLLEXPORT +# define BOOST_DLLEXPORT +#endif + +#endif // BOOST_SERIALIZATION_FORCE_INCLUDE_HPP diff --git a/3rdParty/Boost/src/boost/serialization/is_bitwise_serializable.hpp b/3rdParty/Boost/src/boost/serialization/is_bitwise_serializable.hpp new file mode 100644 index 0000000..34eec40 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/is_bitwise_serializable.hpp @@ -0,0 +1,46 @@ +// (C) Copyright 2007 Matthias Troyer + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Matthias Troyer + +/** @file is_bitwise_serializable.hpp + * + * This header provides a traits class for determining whether a class + * can be serialized (in a non-portable way) just by copying the bits. + */ + + +#ifndef BOOST_SERIALIZATION_IS_BITWISE_SERIALIZABLE_HPP +#define BOOST_SERIALIZATION_IS_BITWISE_SERIALIZABLE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include <boost/mpl/bool.hpp> +#include <boost/type_traits/is_arithmetic.hpp> + +namespace boost { +namespace serialization { + template<class T> + struct is_bitwise_serializable + : public is_arithmetic< T > + {}; +} // namespace serialization +} // namespace boost + + +// define a macro to make explicit designation of this more transparent +#define BOOST_IS_BITWISE_SERIALIZABLE(T) \ +namespace boost { \ +namespace serialization { \ +template<> \ +struct is_bitwise_serializable< T > : mpl::true_ {}; \ +}} \ +/**/ + +#endif //BOOST_SERIALIZATION_IS_BITWISE_SERIALIZABLE_HPP diff --git a/3rdParty/Boost/src/boost/serialization/level.hpp b/3rdParty/Boost/src/boost/serialization/level.hpp new file mode 100644 index 0000000..ce507b2 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/level.hpp @@ -0,0 +1,125 @@ +#ifndef BOOST_SERIALIZATION_LEVEL_HPP +#define BOOST_SERIALIZATION_LEVEL_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// level.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> + +#include <boost/type_traits/is_fundamental.hpp> +#include <boost/type_traits/is_enum.hpp> +#include <boost/type_traits/is_array.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_base_and_derived.hpp> + +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/integral_c_tag.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> + +#include <boost/serialization/level_enum.hpp> + +namespace boost { +namespace serialization { + +struct basic_traits; + +// default serialization implementation level +template<class T> +struct implementation_level_impl { + template<class U> + struct traits_class_level { + typedef BOOST_DEDUCED_TYPENAME U::level type; + }; + + typedef mpl::integral_c_tag tag; + // note: at least one compiler complained w/o the full qualification + // on basic traits below + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_base_and_derived<boost::serialization::basic_traits, T>, + traits_class_level< T >, + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_fundamental< T >, + mpl::int_<primitive_type>, + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_class< T >, + mpl::int_<object_class_info>, + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_array< T >, + #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) + mpl::int_<not_serializable>, + #else + mpl::int_<object_serializable>, + #endif + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_enum< T >, + //#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) + // mpl::int_<not_serializable>, + //#else + mpl::int_<primitive_type>, + //#endif + //else + mpl::int_<not_serializable> + > + > + > + > + >::type type; + // vc 7.1 doesn't like enums here + BOOST_STATIC_CONSTANT(int, value = type::value); +}; + +template<class T> +struct implementation_level : + public implementation_level_impl<const T> +{ +}; + +template<class T, BOOST_MPL_AUX_NTTP_DECL(int, L) > +inline bool operator>=(implementation_level< T > t, enum level_type l) +{ + return t.value >= (int)l; +} + +} // namespace serialization +} // namespace boost + +// specify the level of serialization implementation for the class +// require that class info saved when versioning is used +#define BOOST_CLASS_IMPLEMENTATION(T, E) \ + namespace boost { \ + namespace serialization { \ + template <> \ + struct implementation_level_impl< const T > \ + { \ + typedef mpl::integral_c_tag tag; \ + typedef mpl::int_< E > type; \ + BOOST_STATIC_CONSTANT( \ + int, \ + value = implementation_level_impl::type::value \ + ); \ + }; \ + } \ + } + /**/ + +#endif // BOOST_SERIALIZATION_LEVEL_HPP diff --git a/3rdParty/Boost/src/boost/serialization/level_enum.hpp b/3rdParty/Boost/src/boost/serialization/level_enum.hpp new file mode 100644 index 0000000..11bd17f --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/level_enum.hpp @@ -0,0 +1,55 @@ +#ifndef BOOST_SERIALIZATION_LEVEL_ENUM_HPP +#define BOOST_SERIALIZATION_LEVEL_ENUM_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// level_enum.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +namespace boost { +namespace serialization { + +// for each class used in the program, specify which level +// of serialization should be implemented + +// names for each level +enum level_type +{ + // Don't serialize this type. An attempt to do so should + // invoke a compile time assertion. + not_serializable = 0, + // write/read this type directly to the archive. In this case + // serialization code won't be called. This is the default + // case for fundamental types. It presumes a member function or + // template in the archive class that can handle this type. + // there is no runtime overhead associated reading/writing + // instances of this level + primitive_type = 1, + // Serialize the objects of this type using the objects "serialize" + // function or template. This permits values to be written/read + // to/from archives but includes no class or version information. + object_serializable = 2, + /////////////////////////////////////////////////////////////////// + // once an object is serialized at one of the above levels, the + // corresponding archives cannot be read if the implementation level + // for the archive object is changed. + /////////////////////////////////////////////////////////////////// + // Add class information to the archive. Class information includes + // implementation level, class version and class name if available + object_class_info = 3 +}; + +} // namespace serialization +} // namespace boost + +#endif // BOOST_SERIALIZATION_LEVEL_ENUM_HPP diff --git a/3rdParty/Boost/src/boost/serialization/nvp.hpp b/3rdParty/Boost/src/boost/serialization/nvp.hpp new file mode 100644 index 0000000..2d7f4ed --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/nvp.hpp @@ -0,0 +1,144 @@ +#ifndef BOOST_SERIALIZATION_NVP_HPP +#define BOOST_SERIALIZATION_NVP_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// nvp.hpp: interface for serialization system. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <utility> + +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> +// supress noise +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/integral_c_tag.hpp> + +#include <boost/serialization/level.hpp> +#include <boost/serialization/tracking.hpp> +#include <boost/serialization/split_member.hpp> +#include <boost/serialization/base_object.hpp> +#include <boost/serialization/traits.hpp> +#include <boost/serialization/wrapper.hpp> + +namespace boost { +namespace serialization { + +template<class T> +struct nvp : + public std::pair<const char *, T *>, + public wrapper_traits<const nvp< T > > +{ + explicit nvp(const char * name_, T & t) : + // note: redundant cast works around borland issue + // note: added _ to suppress useless gcc warning + std::pair<const char *, T *>(name_, (T*)(& t)) + {} + nvp(const nvp & rhs) : + // note: redundant cast works around borland issue + std::pair<const char *, T *>(rhs.first, (T*)rhs.second) + {} + + const char * name() const { + return this->first; + } + T & value() const { + return *(this->second); + } + + const T & const_value() const { + return *(this->second); + } + + // True64 compiler complains with a warning about the use of + // the name "Archive" hiding some higher level usage. I'm sure this + // is an error but I want to accomodated as it generates a long warning + // listing and might be related to a lot of test failures. + // default treatment for name-value pairs. The name is + // just discarded and only the value is serialized. + template<class Archivex> + void save( + Archivex & ar, + const unsigned int /* file_version */ + ) const { + // CodeWarrior 8.x can't seem to resolve the << op for a rhs of "const T *" + ar.operator<<(const_value()); + } + template<class Archivex> + void load( + Archivex & ar, + const unsigned int /* file_version */ + ){ + // CodeWarrior 8.x can't seem to resolve the >> op for a rhs of "const T *" + ar.operator>>(value()); + } + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +template<class T> +inline +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +const +#endif +nvp< T > make_nvp(const char * name, T & t){ + return nvp< T >(name, t); +} + +// to maintain efficiency and portability, we want to assign +// specific serialization traits to all instances of this wrappers. +// we can't strait forward method below as it depends upon +// Partial Template Specialization and doing so would mean that wrappers +// wouldn't be treated the same on different platforms. This would +// break archive portability. Leave this here as reminder not to use it !!! +#if 0 // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template <class T> +struct implementation_level<nvp< T > > +{ + typedef mpl::integral_c_tag tag; + typedef mpl::int_<object_serializable> type; + BOOST_STATIC_CONSTANT(int, value = implementation_level::type::value); +}; + +// nvp objects are generally created on the stack and are never tracked +template<class T> +struct tracking_level<nvp< T > > +{ + typedef mpl::integral_c_tag tag; + typedef mpl::int_<track_never> type; + BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value); +}; + +#endif + +} // seralization +} // boost + +#include <boost/preprocessor/stringize.hpp> + +#define BOOST_SERIALIZATION_NVP(name) \ + boost::serialization::make_nvp(BOOST_PP_STRINGIZE(name), name) +/**/ + +#define BOOST_SERIALIZATION_BASE_OBJECT_NVP(name) \ + boost::serialization::make_nvp( \ + BOOST_PP_STRINGIZE(name), \ + boost::serialization::base_object<name >(*this) \ + ) +/**/ + +#endif // BOOST_SERIALIZATION_NVP_HPP diff --git a/3rdParty/Boost/src/boost/serialization/pfto.hpp b/3rdParty/Boost/src/boost/serialization/pfto.hpp new file mode 100644 index 0000000..8d98463 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/pfto.hpp @@ -0,0 +1,78 @@ +#ifndef BOOST_SERIALIZATION_PFTO_HPP +#define BOOST_SERIALIZATION_PFTO_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// pfto.hpp: workarounds for compilers which have problems supporting +// Partial Function Template Ordering (PFTO). + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/serialization for updates, documentation, and revision history. +// PFTO version is used to specify the last argument of certain functions +// Function it is used to support compilers that fail to support correct Partial +// Template Ordering +#include <boost/config.hpp> + +// some compilers can use an exta argument and use function overloading +// to choose desired function. This extra argument is long in the default +// function implementation and int for the rest. The function is called +// with an int argument. This first attempts to match functions with an +// int argument before the default one (with a long argument). This is +// known to function with VC 6.0. On other compilers this fails (Borland) +// or causes other problems (GCC). note: this + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + #define BOOST_PFTO long +#else + #define BOOST_PFTO +#endif + +// here's another approach. Rather than use a default function - make sure +// there is no default at all by requiring that all function invocations +// have a "wrapped" argument type. This solves a problem with VC 6.0 +// (and perhaps others) while implementing templated constructors. + +namespace boost { +namespace serialization { + +template<class T> +struct pfto_wrapper { + const T & t; + operator const T & (){ + return t; + } + pfto_wrapper (const T & rhs) : t(rhs) {} +}; + +template<class T> +pfto_wrapper< T > make_pfto_wrapper(const T & t, BOOST_PFTO int){ + return pfto_wrapper< T >(t); +} + +template<class T> +pfto_wrapper< T > make_pfto_wrapper(const pfto_wrapper< T > & t, int){ + return t; +} + +} // namespace serialization +} // namespace boost + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + #define BOOST_PFTO_WRAPPER(T) \ + boost::serialization::pfto_wrapper< T > + #define BOOST_MAKE_PFTO_WRAPPER(t) \ + boost::serialization::make_pfto_wrapper(t, 0) +#else + #define BOOST_PFTO_WRAPPER(T) T + #define BOOST_MAKE_PFTO_WRAPPER(t) t +#endif + +#endif // BOOST_SERIALIZATION_PFTO_HPP diff --git a/3rdParty/Boost/src/boost/serialization/serialization.hpp b/3rdParty/Boost/src/boost/serialization/serialization.hpp new file mode 100644 index 0000000..f17e8dd --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/serialization.hpp @@ -0,0 +1,167 @@ +#ifndef BOOST_SERIALIZATION_SERIALIZATION_HPP +#define BOOST_SERIALIZATION_SERIALIZATION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#if defined(_MSC_VER) && (_MSC_VER >= 1310) +# pragma warning (disable : 4675) // suppress ADL warning +#endif + +#include <boost/config.hpp> +#include <boost/serialization/strong_typedef.hpp> +#include <boost/serialization/pfto.hpp> + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// serialization.hpp: interface for serialization system. + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +////////////////////////////////////////////////////////////////////// +// public interface to serialization. + +///////////////////////////////////////////////////////////////////////////// +// layer 0 - intrusive verison +// declared and implemented for each user defined class to be serialized +// +// template<Archive> +// serialize(Archive &ar, const unsigned int file_version){ +// ar & base_object<base>(*this) & member1 & member2 ... ; +// } + +///////////////////////////////////////////////////////////////////////////// +// layer 1 - layer that routes member access through the access class. +// this is what permits us to grant access to private class member functions +// by specifying friend class boost::serialization::access + +#include <boost/serialization/access.hpp> + +///////////////////////////////////////////////////////////////////////////// +// layer 2 - default implementation of non-intrusive serialization. +// +// note the usage of function overloading to compensate that C++ does not +// currently support Partial Template Specialization for function templates +// We have declared the version number as "const unsigned long". +// Overriding templates for specific data types should declare the version +// number as "const unsigned int". Template matching will first be applied +// to functions with the same version types - that is the overloads. +// If there is no declared function prototype that matches, the second argument +// will be converted to "const unsigned long" and a match will be made with +// one of the default template functions below. + +namespace boost { +namespace serialization { + +BOOST_STRONG_TYPEDEF(unsigned int, version_type) + +// default implementation - call the member function "serialize" +template<class Archive, class T> +inline void serialize( + Archive & ar, T & t, const BOOST_PFTO unsigned int file_version +){ + access::serialize(ar, t, static_cast<unsigned int>(file_version)); +} + +// save data required for construction +template<class Archive, class T> +inline void save_construct_data( + Archive & /*ar*/, + const T * /*t*/, + const BOOST_PFTO unsigned int /*file_version */ +){ + // default is to save no data because default constructor + // requires no arguments. +} + +// load data required for construction and invoke constructor in place +template<class Archive, class T> +inline void load_construct_data( + Archive & /*ar*/, + T * t, + const BOOST_PFTO unsigned int /*file_version*/ +){ + // default just uses the default constructor. going + // through access permits usage of otherwise private default + // constructor + access::construct(t); +} + +///////////////////////////////////////////////////////////////////////////// +// layer 3 - move call into serialization namespace so that ADL will function +// in the manner we desire. +// +// on compilers which don't implement ADL. only the current namespace +// i.e. boost::serialization will be searched. +// +// on compilers which DO implement ADL +// serialize overrides can be in any of the following +// +// 1) same namepace as Archive +// 2) same namespace as T +// 3) boost::serialization +// +// Due to Martin Ecker + +template<class Archive, class T> +inline void serialize_adl( + Archive & ar, + T & t, + const unsigned int file_version +){ + // note usage of function overloading to delay final resolution + // until the point of instantiation. This works around the two-phase + // lookup "feature" which inhibits redefintion of a default function + // template implementation. Due to Robert Ramey + // + // Note that this trick generates problems for compiles which don't support + // PFTO, suppress it here. As far as we know, there are no compilers + // which fail to support PFTO while supporting two-phase lookup. + #if ! defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + const version_type v(file_version); + serialize(ar, t, v); + #else + serialize(ar, t, file_version); + #endif +} + +template<class Archive, class T> +inline void save_construct_data_adl( + Archive & ar, + const T * t, + const unsigned int file_version +){ + // see above + #if ! defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + const version_type v(file_version); + save_construct_data(ar, t, v); + #else + save_construct_data(ar, t, file_version); + #endif +} + +template<class Archive, class T> +inline void load_construct_data_adl( + Archive & ar, + T * t, + const unsigned int file_version +){ + // see above comment + #if ! defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + const version_type v(file_version); + load_construct_data(ar, t, v); + #else + load_construct_data(ar, t, file_version); + #endif +} + +} // namespace serialization +} // namespace boost + +#endif //BOOST_SERIALIZATION_SERIALIZATION_HPP diff --git a/3rdParty/Boost/src/boost/serialization/split_free.hpp b/3rdParty/Boost/src/boost/serialization/split_free.hpp new file mode 100644 index 0000000..9dbcd2f --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/split_free.hpp @@ -0,0 +1,93 @@ +#ifndef BOOST_SERIALIZATION_SPLIT_FREE_HPP +#define BOOST_SERIALIZATION_SPLIT_FREE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// split_free.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <boost/config.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/serialization/serialization.hpp> + +namespace boost { +namespace archive { + namespace detail { + template<class Archive> class interface_oarchive; + template<class Archive> class interface_iarchive; + } // namespace detail +} // namespace archive + +namespace serialization { + +//namespace detail { +template<class Archive, class T> +struct free_saver { + static void invoke( + Archive & ar, + const T & t, + const unsigned int file_version + ){ + // use function overload (version_type) to workaround + // two-phase lookup issue + const version_type v(file_version); + save(ar, t, v); + } +}; +template<class Archive, class T> +struct free_loader { + static void invoke( + Archive & ar, + T & t, + const unsigned int file_version + ){ + // use function overload (version_type) to workaround + // two-phase lookup issue + const version_type v(file_version); + load(ar, t, v); + } +}; +//} // namespace detail + +template<class Archive, class T> +inline void split_free( + Archive & ar, + T & t, + const unsigned int file_version +){ + typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + BOOST_DEDUCED_TYPENAME Archive::is_saving, + mpl::identity</* detail:: */ free_saver<Archive, T> >, + mpl::identity</* detail:: */ free_loader<Archive, T> > + >::type typex; + typex::invoke(ar, t, file_version); +} + +} // namespace serialization +} // namespace boost + +#define BOOST_SERIALIZATION_SPLIT_FREE(T) \ +namespace boost { namespace serialization { \ +template<class Archive> \ +inline void serialize( \ + Archive & ar, \ + T & t, \ + const unsigned int file_version \ +){ \ + split_free(ar, t, file_version); \ +} \ +}} +/**/ + +#endif // BOOST_SERIALIZATION_SPLIT_FREE_HPP diff --git a/3rdParty/Boost/src/boost/serialization/split_member.hpp b/3rdParty/Boost/src/boost/serialization/split_member.hpp new file mode 100644 index 0000000..6987945 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/split_member.hpp @@ -0,0 +1,86 @@ +#ifndef BOOST_SERIALIZATION_SPLIT_MEMBER_HPP +#define BOOST_SERIALIZATION_SPLIT_MEMBER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// split_member.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <boost/config.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> + +#include <boost/serialization/access.hpp> + +namespace boost { +namespace archive { + namespace detail { + template<class Archive> class interface_oarchive; + template<class Archive> class interface_iarchive; + } // namespace detail +} // namespace archive + +namespace serialization { +namespace detail { + + template<class Archive, class T> + struct member_saver { + static void invoke( + Archive & ar, + const T & t, + const unsigned int file_version + ){ + access::member_save(ar, t, file_version); + } + }; + + template<class Archive, class T> + struct member_loader { + static void invoke( + Archive & ar, + T & t, + const unsigned int file_version + ){ + access::member_load(ar, t, file_version); + } + }; + +} // detail + +template<class Archive, class T> +inline void split_member( + Archive & ar, T & t, const unsigned int file_version +){ + typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + BOOST_DEDUCED_TYPENAME Archive::is_saving, + mpl::identity<detail::member_saver<Archive, T> >, + mpl::identity<detail::member_loader<Archive, T> > + >::type typex; + typex::invoke(ar, t, file_version); +} + +} // namespace serialization +} // namespace boost + +// split member function serialize funcition into save/load +#define BOOST_SERIALIZATION_SPLIT_MEMBER() \ +template<class Archive> \ +void serialize( \ + Archive &ar, \ + const unsigned int file_version \ +){ \ + boost::serialization::split_member(ar, *this, file_version); \ +} \ +/**/ + +#endif // BOOST_SERIALIZATION_SPLIT_MEMBER_HPP diff --git a/3rdParty/Boost/src/boost/serialization/strong_typedef.hpp b/3rdParty/Boost/src/boost/serialization/strong_typedef.hpp new file mode 100644 index 0000000..647c302 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/strong_typedef.hpp @@ -0,0 +1,66 @@ +#ifndef BOOST_SERIALIZATION_STRONG_TYPEDEF_HPP +#define BOOST_SERIALIZATION_STRONG_TYPEDEF_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// strong_typedef.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/serialization for updates, documentation, and revision history. + +// macro used to implement a strong typedef. strong typedef +// guarentees that two types are distinguised even though the +// share the same underlying implementation. typedef does not create +// a new type. BOOST_STRONG_TYPEDEF(T, D) creates a new type named D +// that operates as a type T. + +#include <boost/config.hpp> +#include <boost/operators.hpp> + +#if !defined(__BORLANDC__) || __BORLANDC__ >= 0x590 + #define BOOST_STRONG_TYPEDEF(T, D) \ + struct D \ + : boost::totally_ordered1< D \ + , boost::totally_ordered2< D, T \ + > > \ + { \ + T t; \ + explicit D(const T t_) : t(t_) {}; \ + D(){}; \ + D(const D & t_) : t(t_.t){} \ + D & operator=(const D & rhs) { t = rhs.t; return *this;} \ + D & operator=(const T & rhs) { t = rhs; return *this;} \ + operator const T & () const {return t; } \ + operator T & () { return t; } \ + bool operator==(const D & rhs) const { return t == rhs.t; } \ + bool operator<(const D & rhs) const { return t < rhs.t; } \ + }; +#else + #define BOOST_STRONG_TYPEDEF(T, D) \ + struct D \ + : boost::totally_ordered1< D \ + , boost::totally_ordered2< D, T \ + > > \ + { \ + T t; \ + explicit D(const T t_) : t(t_) {}; \ + D(){}; \ + D(const D & t_) : t(t_.t){} \ + D & operator=(const D & rhs) { t = rhs.t; return *this;} \ + D & operator=(const T & rhs) { t = rhs; return *this;} \ + /*operator const T & () const {return t; }*/ \ + operator T & () { return t; } \ + bool operator==(const D & rhs) const { return t == rhs.t; } \ + bool operator<(const D & rhs) const { return t < rhs.t; } \ + }; +#endif // !defined(__BORLANDC) || __BORLANDC__ >= 0x590 + +#endif // BOOST_SERIALIZATION_STRONG_TYPEDEF_HPP diff --git a/3rdParty/Boost/src/boost/serialization/tracking.hpp b/3rdParty/Boost/src/boost/serialization/tracking.hpp new file mode 100644 index 0000000..fadcbd0 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/tracking.hpp @@ -0,0 +1,118 @@ +#ifndef BOOST_SERIALIZATION_TRACKING_HPP +#define BOOST_SERIALIZATION_TRACKING_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// tracking.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <boost/config.hpp> +#include <boost/static_assert.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/greater.hpp> +#include <boost/mpl/integral_c_tag.hpp> + +#include <boost/type_traits/is_base_and_derived.hpp> +#include <boost/type_traits/is_pointer.hpp> +#include <boost/serialization/level.hpp> +#include <boost/serialization/tracking_enum.hpp> +#include <boost/serialization/type_info_implementation.hpp> + +namespace boost { +namespace serialization { + +struct basic_traits; + +// default tracking level +template<class T> +struct tracking_level_impl { + template<class U> + struct traits_class_tracking { + typedef BOOST_DEDUCED_TYPENAME U::tracking type; + }; + typedef mpl::integral_c_tag tag; + // note: at least one compiler complained w/o the full qualification + // on basic traits below + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_base_and_derived<boost::serialization::basic_traits, T>, + traits_class_tracking< T >, + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_pointer< T >, + // pointers are not tracked by default + mpl::int_<track_never>, + //else + BOOST_DEDUCED_TYPENAME mpl::eval_if< + // for primitives + BOOST_DEDUCED_TYPENAME mpl::equal_to< + implementation_level< T >, + mpl::int_<primitive_type> + >, + // is never + mpl::int_<track_never>, + // otherwise its selective + mpl::int_<track_selectively> + > > >::type type; + BOOST_STATIC_CONSTANT(int, value = type::value); +}; + +template<class T> +struct tracking_level : + public tracking_level_impl<const T> +{ +}; + +template<class T, enum tracking_type L> +inline bool operator>=(tracking_level< T > t, enum tracking_type l) +{ + return t.value >= (int)l; +} + +} // namespace serialization +} // namespace boost + + +// The STATIC_ASSERT is prevents one from setting tracking for a primitive type. +// This almost HAS to be an error. Doing this will effect serialization of all +// char's in your program which is almost certainly what you don't want to do. +// If you want to track all instances of a given primitive type, You'll have to +// wrap it in your own type so its not a primitive anymore. Then it will compile +// without problem. +#define BOOST_CLASS_TRACKING(T, E) \ +namespace boost { \ +namespace serialization { \ +template<> \ +struct tracking_level< T > \ +{ \ + typedef mpl::integral_c_tag tag; \ + typedef mpl::int_< E> type; \ + BOOST_STATIC_CONSTANT( \ + int, \ + value = tracking_level::type::value \ + ); \ + /* tracking for a class */ \ + BOOST_STATIC_ASSERT(( \ + mpl::greater< \ + /* that is a prmitive */ \ + implementation_level< T >, \ + mpl::int_<primitive_type> \ + >::value \ + )); \ +}; \ +}} + +#endif // BOOST_SERIALIZATION_TRACKING_HPP diff --git a/3rdParty/Boost/src/boost/serialization/tracking_enum.hpp b/3rdParty/Boost/src/boost/serialization/tracking_enum.hpp new file mode 100644 index 0000000..e4e4e21 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/tracking_enum.hpp @@ -0,0 +1,41 @@ +#ifndef BOOST_SERIALIZATION_TRACKING_ENUM_HPP +#define BOOST_SERIALIZATION_TRACKING_ENUM_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// tracking_enum.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +namespace boost { +namespace serialization { + +// addresses of serialized objects may be tracked to avoid saving/loading +// redundant copies. This header defines a class trait that can be used +// to specify when objects should be tracked + +// names for each tracking level +enum tracking_type +{ + // never track this type + track_never = 0, + // track objects of this type if the object is serialized through a + // pointer. + track_selectively = 1, + // always track this type + track_always = 2 +}; + +} // namespace serialization +} // namespace boost + +#endif // BOOST_SERIALIZATION_TRACKING_ENUM_HPP diff --git a/3rdParty/Boost/src/boost/serialization/traits.hpp b/3rdParty/Boost/src/boost/serialization/traits.hpp new file mode 100644 index 0000000..da80009 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/traits.hpp @@ -0,0 +1,65 @@ +#ifndef BOOST_SERIALIZATION_TRAITS_HPP +#define BOOST_SERIALIZATION_TRAITS_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// traits.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// This header is used to apply serialization traits to templates. The +// standard system can't be used for platforms which don't support +// Partial Templlate Specialization. + +// The motivation for this is the Name-Value Pair (NVP) template. +// it has to work the same on all platforms in order for archives +// to be portable accross platforms. + +#include <boost/config.hpp> +#include <boost/static_assert.hpp> + +#include <boost/mpl/int.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/serialization/level_enum.hpp> +#include <boost/serialization/tracking_enum.hpp> + +namespace boost { +namespace serialization { + +// common base class used to detect appended traits class +struct basic_traits {}; + +template <class T> +struct extended_type_info_impl; + +template< + class T, + int Level, + int Tracking, + unsigned int Version = 0, + class ETII = extended_type_info_impl< T >, + class Wrapper = mpl::false_ +> +struct traits : public basic_traits { + BOOST_STATIC_ASSERT(Version == 0 || Level >= object_class_info); + BOOST_STATIC_ASSERT(Tracking == track_never || Level >= object_serializable); + typedef BOOST_DEDUCED_TYPENAME mpl::int_<Level> level; + typedef BOOST_DEDUCED_TYPENAME mpl::int_<Tracking> tracking; + typedef BOOST_DEDUCED_TYPENAME mpl::int_<Version> version; + typedef ETII type_info_implementation; + typedef Wrapper is_wrapper; +}; + +} // namespace serialization +} // namespace boost + +#endif // BOOST_SERIALIZATION_TRAITS_HPP diff --git a/3rdParty/Boost/src/boost/serialization/type_info_implementation.hpp b/3rdParty/Boost/src/boost/serialization/type_info_implementation.hpp new file mode 100644 index 0000000..00eb152 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/type_info_implementation.hpp @@ -0,0 +1,86 @@ +#ifndef BOOST_SERIALIZATION_TYPE_INFO_IMPLEMENTATION_HPP +#define BOOST_SERIALIZATION_TYPE_INFO_IMPLEMENTATION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// type_info_implementation.hpp: interface for portable version of type_info + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + + +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> + +#include <boost/static_assert.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/is_base_and_derived.hpp> +#include <boost/serialization/traits.hpp> + +namespace boost { +namespace serialization { + +// note that T and const T are folded into const T so that +// there is only one table entry per type +template<class T> +struct type_info_implementation { + template<class U> + struct traits_class_typeinfo_implementation { + typedef BOOST_DEDUCED_TYPENAME U::type_info_implementation::type type; + }; + // note: at least one compiler complained w/o the full qualification + // on basic traits below + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_base_and_derived<boost::serialization::basic_traits, T>, + traits_class_typeinfo_implementation< T >, + //else + mpl::identity< + BOOST_DEDUCED_TYPENAME extended_type_info_impl< T >::type + > + >::type type; +}; + +} // namespace serialization +} // namespace boost + +// define a macro to assign a particular derivation of extended_type_info +// to a specified a class. +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) +#define BOOST_CLASS_TYPE_INFO(T, ETI) \ +namespace boost { \ +namespace serialization { \ +template<> \ +struct type_info_implementation< T > { \ + typedef const ETI type; \ +}; \ +} \ +} \ +/**/ +#else +#define BOOST_CLASS_TYPE_INFO(T, ETI) \ +namespace boost { \ +namespace serialization { \ +template<> \ +struct type_info_implementation< T > { \ + typedef ETI type; \ +}; \ +template<> \ +struct type_info_implementation< const T > { \ + typedef ETI type; \ +}; \ +} \ +} \ +/**/ +#endif + +#endif /// BOOST_SERIALIZATION_TYPE_INFO_IMPLEMENTATION_HPP diff --git a/3rdParty/Boost/src/boost/serialization/version.hpp b/3rdParty/Boost/src/boost/serialization/version.hpp new file mode 100644 index 0000000..72862fa --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/version.hpp @@ -0,0 +1,102 @@ +#ifndef BOOST_SERIALIZATION_VERSION_HPP +#define BOOST_SERIALIZATION_VERSION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// version.hpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <boost/config.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/integral_c_tag.hpp> + +#include <boost/type_traits/is_base_and_derived.hpp> + +namespace boost { +namespace serialization { + +struct basic_traits; + +// default version number is 0. Override with higher version +// when class definition changes. +template<class T> +struct version +{ + template<class U> + struct traits_class_version { + typedef BOOST_DEDUCED_TYPENAME U::version type; + }; + + typedef mpl::integral_c_tag tag; + // note: at least one compiler complained w/o the full qualification + // on basic traits below + typedef + BOOST_DEDUCED_TYPENAME mpl::eval_if< + is_base_and_derived<boost::serialization::basic_traits,T>, + traits_class_version< T >, + mpl::int_<0> + >::type type; + BOOST_STATIC_CONSTANT(int, value = version::type::value); +}; + +} // namespace serialization +} // namespace boost + +/* note: at first it seemed that this would be a good place to trap + * as an error an attempt to set a version # for a class which doesn't + * save its class information (including version #) in the archive. + * However, this imposes a requirement that the version be set after + * the implemention level which would be pretty confusing. If this + * is to be done, do this check in the input or output operators when + * ALL the serialization traits are available. Included the implementation + * here with this comment as a reminder not to do this! + */ +//#include <boost/serialization/level.hpp> +//#include <boost/mpl/equal_to.hpp> + +#include <boost/mpl/less.hpp> +#include <boost/mpl/comparison.hpp> + +// specify the current version number for the class +// version numbers limited to 8 bits !!! +#define BOOST_CLASS_VERSION(T, N) \ +namespace boost { \ +namespace serialization { \ +template<> \ +struct version<T > \ +{ \ + typedef mpl::int_<N> type; \ + typedef mpl::integral_c_tag tag; \ + BOOST_STATIC_CONSTANT(int, value = version::type::value); \ + BOOST_MPL_ASSERT(( \ + boost::mpl::less< \ + boost::mpl::int_<N>, \ + boost::mpl::int_<256> \ + > \ + )); \ + /* \ + BOOST_MPL_ASSERT(( \ + mpl::equal_to< \ + :implementation_level<T >, \ + mpl::int_<object_class_info> \ + >::value \ + )); \ + */ \ +}; \ +} \ +} + +#endif // BOOST_SERIALIZATION_VERSION_HPP diff --git a/3rdParty/Boost/src/boost/serialization/void_cast_fwd.hpp b/3rdParty/Boost/src/boost/serialization/void_cast_fwd.hpp new file mode 100644 index 0000000..c94adb2 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/void_cast_fwd.hpp @@ -0,0 +1,37 @@ +#ifndef BOOST_SERIALIZATION_VOID_CAST_FWD_HPP +#define BOOST_SERIALIZATION_VOID_CAST_FWD_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// void_cast_fwd.hpp: interface for run-time casting of void pointers. + +// (C) Copyright 2005 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// gennadiy.rozental@tfn.com + +// See http://www.boost.org for updates, documentation, and revision history. + +#include <cstddef> // NULL +#include <boost/serialization/force_include.hpp> + +namespace boost { +namespace serialization { +namespace void_cast_detail{ +class void_caster; +} // namespace void_cast_detail +template<class Derived, class Base> +BOOST_DLLEXPORT +inline const void_cast_detail::void_caster & void_cast_register( + const Derived * dnull = NULL, + const Base * bnull = NULL +) BOOST_USED; +} // namespace serialization +} // namespace boost + +#endif // BOOST_SERIALIZATION_VOID_CAST_HPP diff --git a/3rdParty/Boost/src/boost/serialization/wrapper.hpp b/3rdParty/Boost/src/boost/serialization/wrapper.hpp new file mode 100644 index 0000000..eeb4333 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/wrapper.hpp @@ -0,0 +1,60 @@ +#ifndef BOOST_SERIALIZATION_WRAPPER_HPP +#define BOOST_SERIALIZATION_WRAPPER_HPP + +// (C) Copyright 2005-2006 Matthias Troyer +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/serialization/traits.hpp> +#include <boost/type_traits/is_base_and_derived.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace serialization { + +/// the base class for serialization wrappers +/// +/// wrappers need to be treated differently at various places in the serialization library, +/// e.g. saving of non-const wrappers has to be possible. Since partial specialization +// is not supported by all compilers, we derive all wrappers from wrapper_traits. + +template< + class T, + int Level = object_serializable, + int Tracking = track_never, + unsigned int Version = 0, + class ETII = extended_type_info_impl< T > +> +struct wrapper_traits : + public traits<T,Level,Tracking,Version,ETII,mpl::true_> +{}; + +template<class T> +struct is_wrapper_impl : + boost::mpl::eval_if< + boost::is_base_and_derived<basic_traits,T>, + boost::mpl::true_, + boost::mpl::false_ + >::type +{}; + +template<class T> +struct is_wrapper { + typedef BOOST_DEDUCED_TYPENAME is_wrapper_impl<const T>::type type; +}; + +} // serialization +} // boost + +// A macro to define that a class is a wrapper +#define BOOST_CLASS_IS_WRAPPER(T) \ +namespace boost { \ +namespace serialization { \ +template<> \ +struct is_wrapper_impl<const T> : boost::mpl::true_ {}; \ +} \ +} \ +/**/ + +#endif //BOOST_SERIALIZATION_WRAPPER_HPP |