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
00030
00031
00032
00033
00034
00035
00036 #ifndef CLASSISABSTRACT_HPP_
00037 #define CLASSISABSTRACT_HPP_
00038
00074 #include <boost/version.hpp>
00075
00076 #if BOOST_VERSION >= 103600
00077
00078
00079 #include <boost/serialization/assume_abstract.hpp>
00080
00086 #define CLASS_IS_ABSTRACT(T) BOOST_SERIALIZATION_ASSUME_ABSTRACT(T)
00087
00092 #define TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00093 : boost::true_type {};
00094
00095 #else
00096
00097
00098 #include <boost/serialization/is_abstract.hpp>
00099
00105 #define CLASS_IS_ABSTRACT(T) BOOST_IS_ABSTRACT(T)
00106
00111 #define TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00112 { \
00113 typedef mpl::bool_<true> type; \
00114 BOOST_STATIC_CONSTANT(bool, value = true); \
00115 };
00116
00117 #endif // BOOST_VERSION >= 103600
00118
00124 #define TEMPLATED_CLASS_IS_ABSTRACT_1_UNSIGNED(T) \
00125 namespace boost { \
00126 namespace serialization { \
00127 template<unsigned U> \
00128 struct is_abstract<T<U> > \
00129 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00130 template<unsigned U> \
00131 struct is_abstract<const T<U> > \
00132 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00133 }}
00134
00140 #define TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED(T) \
00141 namespace boost { \
00142 namespace serialization { \
00143 template<unsigned U1, unsigned U2> \
00144 struct is_abstract<T<U1, U2> > \
00145 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00146 template<unsigned U1, unsigned U2> \
00147 struct is_abstract<const T<U1, U2> > \
00148 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00149 }}
00150
00156 #define TEMPLATED_CLASS_IS_ABSTRACT_3_UNSIGNED(T) \
00157 namespace boost { \
00158 namespace serialization { \
00159 template<unsigned U1, unsigned U2, unsigned U3> \
00160 struct is_abstract<T<U1, U2, U3> > \
00161 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00162 template<unsigned U1, unsigned U2, unsigned U3> \
00163 struct is_abstract<const T<U1, U2, U3> > \
00164 TEMPLATED_CLASS_IS_ABSTRACT_DEFN \
00165 }}
00166
00167 #endif