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
00070 #include <boost/version.hpp>
00071
00073
00074
00075
00076
00077 #if BOOST_VERSION < 103600
00078
00079 #ifndef CHASTE_SERIALIZATION_CPP
00080 #include <boost/serialization/export.hpp>
00081 #endif // CHASTE_SERIALIZATION_CPP
00082
00083 #elif BOOST_VERSION < 104100
00084
00085 #ifdef CHASTE_SERIALIZATION_CPP
00086 #include "CheckpointArchiveTypes.hpp"
00087 #include <boost/serialization/export.hpp>
00088 #endif // CHASTE_SERIALIZATION_CPP
00089
00090 #else
00091
00092 #include <boost/serialization/extended_type_info.hpp>
00093 #include <boost/serialization/export.hpp>
00094 #ifdef CHASTE_SERIALIZATION_CPP
00095 #include "CheckpointArchiveTypes.hpp"
00096 #endif // CHASTE_SERIALIZATION_CPP
00097
00098 #endif
00099
00100
00102 #if BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
00103
00104
00105
00106
00107 #undef CHASTE_CLASS_EXPORT_TEMPLATED
00108
00113 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00114 BOOST_CLASS_EXPORT_IMPLEMENT(T)
00115
00116 #undef CHASTE_CLASS_EXPORT_INTERNAL
00117
00121 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00122 BOOST_CLASS_EXPORT_IMPLEMENT(T)
00123
00124 #endif // BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
00125
00127
00128 #ifndef SERIALIZATIONEXPORTWRAPPER_HPP_
00129 #define SERIALIZATIONEXPORTWRAPPER_HPP_
00130
00131
00133
00134 #include <boost/preprocessor/cat.hpp>
00135 #include <boost/preprocessor/stringize.hpp>
00136
00137
00138 #if BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
00139
00147 #define CHASTE_CLASS_EXPORT_GUID(T, K, S) \
00148 namespace \
00149 { \
00150 ::boost::archive::detail::guid_initializer< T > const & \
00151 BOOST_PP_CAT(BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__), S) \
00152 = ::boost::serialization::singleton< \
00153 ::boost::archive::detail::guid_initializer< T > \
00154 >::get_mutable_instance().export_guid(K); \
00155 }
00156
00162 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00163 CHASTE_CLASS_EXPORT_GUID( \
00164 T, \
00165 BOOST_PP_STRINGIZE(T), S \
00166 ) \
00167
00168
00172 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00173 CHASTE_CLASS_EXPORT_TEMPLATED(T, T)
00174
00175
00176
00177 #elif BOOST_VERSION >= 104100
00178
00179
00185 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00186 BOOST_CLASS_EXPORT_KEY(T)
00187
00192 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00193 BOOST_CLASS_EXPORT_KEY(T)
00194
00195 #else // BOOST_VERSION < 103600 || (BOOST_VERSION >= 103800 && BOOST_VERSION < 104100)
00196
00197
00203 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
00204 BOOST_CLASS_EXPORT(T)
00205
00210 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
00211 BOOST_CLASS_EXPORT(T)
00212
00213 #endif // BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
00214
00215 template<class> struct pack;
00222 template<class T> struct pack<void (T)> {
00223 typedef T type;
00224 };
00225
00231 #define CHASTE_EXPORT_KEY_1(CLASS, P1) \
00232 BOOST_PP_CAT(CLASS, P1)
00233
00240 #define CHASTE_EXPORT_KEY_2(CLASS, P1, P2) \
00241 BOOST_PP_CAT(BOOST_PP_CAT(CLASS, P1), P2)
00242
00250 #define CHASTE_EXPORT_KEY_3(CLASS, P1, P2, P3) \
00251 BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_CAT(CLASS, P1), P2), P3)
00252
00258 #define CHASTE_PACK_1(CLASS, P1) pack<void (CLASS< P1 >)>::type
00259
00266 #define CHASTE_PACK_2(CLASS, P1, P2) pack<void (CLASS< P1,P2 >)>::type
00267
00275 #define CHASTE_PACK_3(CLASS, P1, P2, P3) pack<void (CLASS< P1,P2,P3 >)>::type
00276
00277
00278 #endif // SERIALIZATIONEXPORTWRAPPER_HPP_
00279
00280
00281
00282
00283
00284 #ifdef EXPORT_TEMPLATE_CLASS3_INTERNAL
00285
00286 #undef EXPORT_TEMPLATE_CLASS3_INTERNAL
00287 #undef EXPORT_TEMPLATE_CLASS2_INTERNAL
00288 #undef EXPORT_TEMPLATE_CLASS1_INTERNAL
00289 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL
00290 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL
00291 #endif // EXPORT_TEMPLATE_CLASS3_INTERNAL
00292
00293
00294
00303 #define EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P) \
00304 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_3(CLASS, E, S, P), CHASTE_EXPORT_KEY_3(CLASS, E, S, P) )
00305
00313 #define EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S) \
00314 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_2(CLASS, E, S), CHASTE_EXPORT_KEY_2(CLASS, E, S) )
00315
00322 #define EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D) \
00323 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_1(CLASS, D), CHASTE_EXPORT_KEY_1(CLASS, D) )
00324
00331 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS) \
00332 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 1) \
00333 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 2) \
00334 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 3) \
00335 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 2) \
00336 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 3) \
00337 EXPORT_TEMPLATE_CLASS2(CLASS, 3, 3)
00338
00345 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS) \
00346 EXPORT_TEMPLATE_CLASS1(CLASS, 1) \
00347 EXPORT_TEMPLATE_CLASS1(CLASS, 2) \
00348 EXPORT_TEMPLATE_CLASS1(CLASS, 3)
00349
00350
00351
00352
00353
00354 #if !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
00355 #ifdef CHASTE_SERIALIZATION_CPP
00356
00357 #undef CHASTE_CLASS_EXPORT
00358 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS
00359 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS
00360 #undef EXPORT_TEMPLATE_CLASS1
00361 #undef EXPORT_TEMPLATE_CLASS2
00362 #undef EXPORT_TEMPLATE_CLASS3
00363 #endif // CHASTE_SERIALIZATION_CPP
00364
00365 #if (BOOST_VERSION < 103600 && ! defined(CHASTE_SERIALIZATION_CPP)) || \
00366 (BOOST_VERSION >= 103600 && defined(CHASTE_SERIALIZATION_CPP)) || \
00367 (BOOST_VERSION >= 104100)
00368
00369
00370
00371
00376 #define CHASTE_CLASS_EXPORT(T) CHASTE_CLASS_EXPORT_INTERNAL(T)
00377
00382 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS)
00383
00388 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS)
00389
00394 #define EXPORT_TEMPLATE_CLASS1(CLASS, D) EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D)
00395
00401 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S) EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S)
00402
00409 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P) EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P)
00410
00411 #else
00412
00417 #define CHASTE_CLASS_EXPORT(T)
00418
00422 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
00423
00427 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
00428
00433 #define EXPORT_TEMPLATE_CLASS1(CLASS, D)
00434
00440 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S)
00441
00448 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P)
00449
00450 #endif // Long if!
00451 #endif // !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
00452
00453 #undef COVERAGE_IGNORE