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
00030 #define COVERAGE_IGNORE
00031
00032
00072 #include <boost/version.hpp>
00073
00074
00076
00077
00078
00079
00080 #if BOOST_VERSION < 103600
00081
00082 #ifndef CHASTE_SERIALIZATION_CPP
00083 #include <boost/serialization/export.hpp>
00084 #endif // CHASTE_SERIALIZATION_CPP
00085
00086 #elif BOOST_VERSION < 104100
00087
00088 #ifdef CHASTE_SERIALIZATION_CPP
00089 #include "CheckpointArchiveTypes.hpp"
00090 #include <boost/serialization/export.hpp>
00091 #endif // CHASTE_SERIALIZATION_CPP
00092
00093 #else
00094
00095 #include <boost/serialization/extended_type_info.hpp>
00096 #include <boost/serialization/export.hpp>
00097 #ifdef CHASTE_SERIALIZATION_CPP
00098 #include "CheckpointArchiveTypes.hpp"
00099 #endif // CHASTE_SERIALIZATION_CPP
00100
00101 #endif
00102
00103
00104
00106 #if BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
00107
00108
00109
00110
00111 #undef CHASTE_CLASS_EXPORT_TEMPLATED
00112
00117 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00118 BOOST_CLASS_EXPORT_IMPLEMENT(T)
00119
00120 #undef CHASTE_CLASS_EXPORT_INTERNAL
00121
00125 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00126 BOOST_CLASS_EXPORT_IMPLEMENT(T)
00127
00128 #endif // BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
00129
00130
00132
00133 #ifndef SERIALIZATIONEXPORTWRAPPER_HPP_
00134 #define SERIALIZATIONEXPORTWRAPPER_HPP_
00135
00136
00138
00139 #include <boost/preprocessor/cat.hpp>
00140 #include <boost/preprocessor/stringize.hpp>
00141
00142
00143
00144 #if BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
00145
00153 #define CHASTE_CLASS_EXPORT_GUID(T, K, S) \
00154 namespace \
00155 { \
00156 ::boost::archive::detail::guid_initializer< T > const & \
00157 BOOST_PP_CAT(BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__), S) \
00158 = ::boost::serialization::singleton< \
00159 ::boost::archive::detail::guid_initializer< T > \
00160 >::get_mutable_instance().export_guid(K); \
00161 }
00162
00168 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00169 CHASTE_CLASS_EXPORT_GUID( \
00170 T, \
00171 BOOST_PP_STRINGIZE(T), S \
00172 ) \
00173
00174
00178 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00179 CHASTE_CLASS_EXPORT_TEMPLATED(T, T)
00180
00181
00182
00183 #elif BOOST_VERSION >= 104100
00184
00185
00191 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00192 BOOST_CLASS_EXPORT_KEY(T)
00193
00198 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00199 BOOST_CLASS_EXPORT_KEY(T)
00200
00201
00202 #else // BOOST_VERSION < 103600 || (BOOST_VERSION >= 103800 && BOOST_VERSION < 104100)
00203
00204
00210 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00211 BOOST_CLASS_EXPORT(T)
00212
00217 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00218 BOOST_CLASS_EXPORT(T)
00219
00220 #endif // BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
00221
00222
00223
00224 template<class> struct pack;
00231 template<class T> struct pack<void (T)> {
00232 typedef T type;
00233 };
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
00289
00290 #endif // SERIALIZATIONEXPORTWRAPPER_HPP_
00292
00293
00294
00295
00296
00297 #ifdef EXPORT_TEMPLATE_CLASS3_INTERNAL
00298
00299 #undef EXPORT_TEMPLATE_CLASS3_INTERNAL
00300 #undef EXPORT_TEMPLATE_CLASS2_INTERNAL
00301 #undef EXPORT_TEMPLATE_CLASS1_INTERNAL
00302 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL
00303 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL
00304 #endif // EXPORT_TEMPLATE_CLASS3_INTERNAL
00305
00306
00307
00316 #define EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P) \
00317 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_3(CLASS, E, S, P), CHASTE_EXPORT_KEY_3(CLASS, E, S, P) )
00318
00326 #define EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S) \
00327 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_2(CLASS, E, S), CHASTE_EXPORT_KEY_2(CLASS, E, S) )
00328
00335 #define EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D) \
00336 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_1(CLASS, D), CHASTE_EXPORT_KEY_1(CLASS, D) )
00337
00344 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS) \
00345 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 1) \
00346 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 2) \
00347 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 3) \
00348 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 2) \
00349 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 3) \
00350 EXPORT_TEMPLATE_CLASS2(CLASS, 3, 3)
00351
00358 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS) \
00359 EXPORT_TEMPLATE_CLASS1(CLASS, 1) \
00360 EXPORT_TEMPLATE_CLASS1(CLASS, 2) \
00361 EXPORT_TEMPLATE_CLASS1(CLASS, 3)
00362
00363
00364
00365
00366
00367
00368
00369 #if !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
00370 #ifdef CHASTE_SERIALIZATION_CPP
00371
00372 #undef CHASTE_CLASS_EXPORT
00373 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS
00374 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS
00375 #undef EXPORT_TEMPLATE_CLASS1
00376 #undef EXPORT_TEMPLATE_CLASS2
00377 #undef EXPORT_TEMPLATE_CLASS3
00378 #endif // CHASTE_SERIALIZATION_CPP
00379
00380
00381 #if (BOOST_VERSION < 103600 && ! defined(CHASTE_SERIALIZATION_CPP)) || \
00382 (BOOST_VERSION >= 103600 && defined(CHASTE_SERIALIZATION_CPP)) || \
00383 (BOOST_VERSION >= 104100)
00384
00385
00386
00387
00392 #define CHASTE_CLASS_EXPORT(T) CHASTE_CLASS_EXPORT_INTERNAL(T)
00393
00398 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS)
00399
00404 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS)
00405
00410 #define EXPORT_TEMPLATE_CLASS1(CLASS, D) EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D)
00411
00417 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S) EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S)
00418
00425 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P) EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P)
00426
00427 #else
00428
00433 #define CHASTE_CLASS_EXPORT(T)
00434
00438 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
00439
00443 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
00444
00449 #define EXPORT_TEMPLATE_CLASS1(CLASS, D)
00450
00456 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S)
00457
00464 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P)
00465
00466 #endif // Long if!
00467 #endif // !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
00468
00469
00470
00471 #undef COVERAGE_IGNORE