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
00037 #define COVERAGE_IGNORE
00038
00078 #include <boost/version.hpp>
00079
00081
00082
00083
00084
00085 #if BOOST_VERSION < 103600
00086
00087 #ifndef CHASTE_SERIALIZATION_CPP
00088 #include <boost/serialization/export.hpp>
00089 #endif // CHASTE_SERIALIZATION_CPP
00090
00091 #elif BOOST_VERSION < 104100
00092
00093 #ifdef CHASTE_SERIALIZATION_CPP
00094 #include "CheckpointArchiveTypes.hpp"
00095 #include <boost/serialization/export.hpp>
00096 #endif // CHASTE_SERIALIZATION_CPP
00097
00098 #else
00099
00100 #include <boost/serialization/extended_type_info.hpp>
00101 #include <boost/serialization/export.hpp>
00102 #ifdef CHASTE_SERIALIZATION_CPP
00103 #include "CheckpointArchiveTypes.hpp"
00104 #endif // CHASTE_SERIALIZATION_CPP
00105
00106 #endif
00107
00108
00110 #if BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
00111
00112
00113
00114
00115 #undef CHASTE_CLASS_EXPORT_TEMPLATED
00116
00121 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00122 BOOST_CLASS_EXPORT_IMPLEMENT(T)
00123
00124 #undef CHASTE_CLASS_EXPORT_INTERNAL
00125
00129 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00130 BOOST_CLASS_EXPORT_IMPLEMENT(T)
00131
00132 #endif // BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
00133
00135
00136 #ifndef SERIALIZATIONEXPORTWRAPPER_HPP_
00137
00138 #define SERIALIZATIONEXPORTWRAPPER_HPP_
00139
00140
00141
00143
00144 #include <boost/preprocessor/cat.hpp>
00145 #include <boost/preprocessor/stringize.hpp>
00146
00147
00148 #if BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
00149
00157 #define CHASTE_CLASS_EXPORT_GUID(T, K, S) \
00158 namespace \
00159 { \
00160 ::boost::archive::detail::guid_initializer< T > const & \
00161 BOOST_PP_CAT(BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__), S) \
00162 = ::boost::serialization::singleton< \
00163 ::boost::archive::detail::guid_initializer< T > \
00164 >::get_mutable_instance().export_guid(K); \
00165 }
00166
00172 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00173 CHASTE_CLASS_EXPORT_GUID( \
00174 T, \
00175 BOOST_PP_STRINGIZE(T), S \
00176 ) \
00177
00178
00182 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00183 CHASTE_CLASS_EXPORT_TEMPLATED(T, T)
00184
00185
00186
00187 #elif BOOST_VERSION >= 104100
00188
00189
00195 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00196 BOOST_CLASS_EXPORT_KEY(T)
00197
00202 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00203 BOOST_CLASS_EXPORT_KEY(T)
00204
00205 #else // BOOST_VERSION < 103600 || (BOOST_VERSION >= 103800 && BOOST_VERSION < 104100)
00206
00207
00213 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00214 BOOST_CLASS_EXPORT(T)
00215
00220 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00221 BOOST_CLASS_EXPORT(T)
00222
00223 #endif // BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
00224
00225 template<class> struct pack;
00232 template<class T> struct pack<void (T)> {
00233 typedef T type;
00234 };
00235
00241 #define CHASTE_EXPORT_KEY_1(CLASS, P1) \
00242 BOOST_PP_CAT(CLASS, P1)
00243
00250 #define CHASTE_EXPORT_KEY_2(CLASS, P1, P2) \
00251 BOOST_PP_CAT(BOOST_PP_CAT(CLASS, P1), P2)
00252
00260 #define CHASTE_EXPORT_KEY_3(CLASS, P1, P2, P3) \
00261 BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_CAT(CLASS, P1), P2), P3)
00262
00268 #define CHASTE_PACK_1(CLASS, P1) pack<void (CLASS< P1 >)>::type
00269
00276 #define CHASTE_PACK_2(CLASS, P1, P2) pack<void (CLASS< P1,P2 >)>::type
00277
00285 #define CHASTE_PACK_3(CLASS, P1, P2, P3) pack<void (CLASS< P1,P2,P3 >)>::type
00286
00287
00288 #endif // SERIALIZATIONEXPORTWRAPPER_HPP_
00290
00291
00292
00293
00294 #ifdef EXPORT_TEMPLATE_CLASS3_INTERNAL
00295
00296 #undef EXPORT_TEMPLATE_CLASS3_INTERNAL
00297 #undef EXPORT_TEMPLATE_CLASS2_INTERNAL
00298 #undef EXPORT_TEMPLATE_CLASS1_INTERNAL
00299 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL
00300 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL
00301 #endif // EXPORT_TEMPLATE_CLASS3_INTERNAL
00302
00303
00304
00313 #define EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P) \
00314 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_3(CLASS, E, S, P), CHASTE_EXPORT_KEY_3(CLASS, E, S, P) )
00315
00323 #define EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S) \
00324 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_2(CLASS, E, S), CHASTE_EXPORT_KEY_2(CLASS, E, S) )
00325
00332 #define EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D) \
00333 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_1(CLASS, D), CHASTE_EXPORT_KEY_1(CLASS, D) )
00334
00341 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS) \
00342 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 1) \
00343 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 2) \
00344 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 3) \
00345 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 2) \
00346 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 3) \
00347 EXPORT_TEMPLATE_CLASS2(CLASS, 3, 3)
00348
00354 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS) \
00355 EXPORT_TEMPLATE_CLASS1(CLASS, 1) \
00356 EXPORT_TEMPLATE_CLASS1(CLASS, 2) \
00357 EXPORT_TEMPLATE_CLASS1(CLASS, 3)
00358
00359
00360
00361
00362
00363 #if !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
00364 #ifdef CHASTE_SERIALIZATION_CPP
00365
00366 #undef CHASTE_CLASS_EXPORT
00367 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS
00368 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS
00369 #undef EXPORT_TEMPLATE_CLASS1
00370 #undef EXPORT_TEMPLATE_CLASS2
00371 #undef EXPORT_TEMPLATE_CLASS3
00372 #endif // CHASTE_SERIALIZATION_CPP
00373
00374 #if (BOOST_VERSION < 103600 && ! defined(CHASTE_SERIALIZATION_CPP)) || \
00375 (BOOST_VERSION >= 103600 && defined(CHASTE_SERIALIZATION_CPP)) || \
00376 (BOOST_VERSION >= 104100)
00377
00378
00379
00380
00385 #define CHASTE_CLASS_EXPORT(T) CHASTE_CLASS_EXPORT_INTERNAL(T)
00386
00390 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS)
00391
00396 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS)
00397
00402 #define EXPORT_TEMPLATE_CLASS1(CLASS, D) EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D)
00403
00409 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S) EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S)
00410
00417 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P) EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P)
00418
00419 #else
00420
00425 #define CHASTE_CLASS_EXPORT(T)
00426
00430 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
00431
00435 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
00436
00441 #define EXPORT_TEMPLATE_CLASS1(CLASS, D)
00442
00448 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S)
00449
00456 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P)
00457
00458 #endif // Long if!
00459 #endif // !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
00460
00461 #undef COVERAGE_IGNORE