ClassIsAbstract.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef CLASSISABSTRACT_HPP_
00030 #define CLASSISABSTRACT_HPP_
00031
00067 #include <boost/version.hpp>
00068
00069 #if BOOST_VERSION >= 103600
00070
00071
00072 #include <boost/serialization/assume_abstract.hpp>
00073
00079 #define CLASS_IS_ABSTRACT(T) BOOST_SERIALIZATION_ASSUME_ABSTRACT(T)
00080
00085 #define TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00086 : boost::true_type {};
00087
00088 #else
00089
00090
00091 #include <boost/serialization/is_abstract.hpp>
00092
00098 #define CLASS_IS_ABSTRACT(T) BOOST_IS_ABSTRACT(T)
00099
00104 #define TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00105 { \
00106 typedef mpl::bool_<true> type; \
00107 BOOST_STATIC_CONSTANT(bool, value = true); \
00108 };
00109
00110 #endif // BOOST_VERSION >= 103600
00111
00117 #define TEMPLATED_CLASS_IS_ABSTRACT_1_UNSIGNED(T) \
00118 namespace boost { \
00119 namespace serialization { \
00120 template<unsigned U> \
00121 struct is_abstract<T<U> > \
00122 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00123 template<unsigned U> \
00124 struct is_abstract<const T<U> > \
00125 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00126 }}
00127
00133 #define TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED(T) \
00134 namespace boost { \
00135 namespace serialization { \
00136 template<unsigned U1, unsigned U2> \
00137 struct is_abstract<T<U1, U2> > \
00138 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00139 template<unsigned U1, unsigned U2> \
00140 struct is_abstract<const T<U1, U2> > \
00141 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00142 }}
00143
00149 #define TEMPLATED_CLASS_IS_ABSTRACT_3_UNSIGNED(T) \
00150 namespace boost { \
00151 namespace serialization { \
00152 template<unsigned U1, unsigned U2, unsigned U3> \
00153 struct is_abstract<T<U1, U2, U3> > \
00154 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00155 template<unsigned U1, unsigned U2, unsigned U3> \
00156 struct is_abstract<const T<U1, U2, U3> > \
00157 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00158 }}
00159
00160 #endif