|
Chaste
Release::3.4
|
Go to the documentation of this file.
37 #define COVERAGE_IGNORE
79 #include <boost/version.hpp>
86 #if BOOST_VERSION < 103600
88 #ifndef CHASTE_SERIALIZATION_CPP
89 #include <boost/serialization/export.hpp>
90 #endif // CHASTE_SERIALIZATION_CPP
92 #elif BOOST_VERSION < 104100
94 #ifdef CHASTE_SERIALIZATION_CPP
96 #include <boost/serialization/export.hpp>
97 #endif // CHASTE_SERIALIZATION_CPP
101 #include <boost/serialization/extended_type_info.hpp>
102 #include <boost/serialization/export.hpp>
103 #ifdef CHASTE_SERIALIZATION_CPP
105 #endif // CHASTE_SERIALIZATION_CPP
111 #if BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
116 #undef CHASTE_CLASS_EXPORT_TEMPLATED
122 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
123 BOOST_CLASS_EXPORT_IMPLEMENT(T)
125 #undef CHASTE_CLASS_EXPORT_INTERNAL
130 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
131 BOOST_CLASS_EXPORT_IMPLEMENT(T)
133 #endif // BOOST_VERSION >= 104100 && defined(CHASTE_SERIALIZATION_CPP)
137 #ifndef SERIALIZATIONEXPORTWRAPPER_HPP_
139 #define SERIALIZATIONEXPORTWRAPPER_HPP_
145 #include <boost/preprocessor/cat.hpp>
146 #include <boost/preprocessor/stringize.hpp>
149 #if BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
158 #define CHASTE_CLASS_EXPORT_GUID(T, K, S) \
161 ::boost::archive::detail::guid_initializer< T > const & \
162 BOOST_PP_CAT(BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__), S) \
163 = ::boost::serialization::singleton< \
164 ::boost::archive::detail::guid_initializer< T > \
165 >::get_mutable_instance().export_guid(K); \
173 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
174 CHASTE_CLASS_EXPORT_GUID( \
176 BOOST_PP_STRINGIZE(T), S \
183 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
184 CHASTE_CLASS_EXPORT_TEMPLATED(T, T)
188 #elif BOOST_VERSION >= 104100
196 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
197 BOOST_CLASS_EXPORT_KEY(T)
203 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
204 BOOST_CLASS_EXPORT_KEY(T)
206 #else // BOOST_VERSION < 103600 || (BOOST_VERSION >= 103800 && BOOST_VERSION < 104100)
214 #define CHASTE_CLASS_EXPORT_TEMPLATED(T, S) \
215 BOOST_CLASS_EXPORT(T)
221 #define CHASTE_CLASS_EXPORT_INTERNAL(T) \
222 BOOST_CLASS_EXPORT(T)
224 #endif // BOOST_VERSION >= 103600 && BOOST_VERSION < 103800
233 template<
class T>
struct pack<void (T)> {
242 #define CHASTE_EXPORT_KEY_1(CLASS, P1) \
243 BOOST_PP_CAT(CLASS, P1)
251 #define CHASTE_EXPORT_KEY_2(CLASS, P1, P2) \
252 BOOST_PP_CAT(BOOST_PP_CAT(CLASS, P1), P2)
261 #define CHASTE_EXPORT_KEY_3(CLASS, P1, P2, P3) \
262 BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_CAT(CLASS, P1), P2), P3)
269 #define CHASTE_PACK_1(CLASS, P1) pack<void (CLASS< P1 >)>::type
277 #define CHASTE_PACK_2(CLASS, P1, P2) pack<void (CLASS< P1,P2 >)>::type
286 #define CHASTE_PACK_3(CLASS, P1, P2, P3) pack<void (CLASS< P1,P2,P3 >)>::type
289 #endif // SERIALIZATIONEXPORTWRAPPER_HPP_
295 #ifdef EXPORT_TEMPLATE_CLASS3_INTERNAL
297 #undef EXPORT_TEMPLATE_CLASS3_INTERNAL
298 #undef EXPORT_TEMPLATE_CLASS2_INTERNAL
299 #undef EXPORT_TEMPLATE_CLASS1_INTERNAL
300 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL
301 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL
302 #endif // EXPORT_TEMPLATE_CLASS3_INTERNAL
314 #define EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P) \
315 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_3(CLASS, E, S, P), CHASTE_EXPORT_KEY_3(CLASS, E, S, P) )
324 #define EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S) \
325 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_2(CLASS, E, S), CHASTE_EXPORT_KEY_2(CLASS, E, S) )
333 #define EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D) \
334 CHASTE_CLASS_EXPORT_TEMPLATED( CHASTE_PACK_1(CLASS, D), CHASTE_EXPORT_KEY_1(CLASS, D) )
342 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS) \
343 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 1) \
344 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 2) \
345 EXPORT_TEMPLATE_CLASS2(CLASS, 1, 3) \
346 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 2) \
347 EXPORT_TEMPLATE_CLASS2(CLASS, 2, 3) \
348 EXPORT_TEMPLATE_CLASS2(CLASS, 3, 3)
355 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS) \
356 EXPORT_TEMPLATE_CLASS1(CLASS, 1) \
357 EXPORT_TEMPLATE_CLASS1(CLASS, 2) \
358 EXPORT_TEMPLATE_CLASS1(CLASS, 3)
364 #if !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
365 #ifdef CHASTE_SERIALIZATION_CPP
367 #undef CHASTE_CLASS_EXPORT
368 #undef EXPORT_TEMPLATE_CLASS_SAME_DIMS
369 #undef EXPORT_TEMPLATE_CLASS_ALL_DIMS
370 #undef EXPORT_TEMPLATE_CLASS1
371 #undef EXPORT_TEMPLATE_CLASS2
372 #undef EXPORT_TEMPLATE_CLASS3
373 #endif // CHASTE_SERIALIZATION_CPP
375 #if (BOOST_VERSION < 103600 && ! defined(CHASTE_SERIALIZATION_CPP)) || \
376 (BOOST_VERSION >= 103600 && defined(CHASTE_SERIALIZATION_CPP)) || \
377 (BOOST_VERSION >= 104100)
386 #define CHASTE_CLASS_EXPORT(T) CHASTE_CLASS_EXPORT_INTERNAL(T)
391 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_SAME_DIMS_INTERNAL(CLASS)
397 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS) EXPORT_TEMPLATE_CLASS_ALL_DIMS_INTERNAL(CLASS)
403 #define EXPORT_TEMPLATE_CLASS1(CLASS, D) EXPORT_TEMPLATE_CLASS1_INTERNAL(CLASS, D)
410 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S) EXPORT_TEMPLATE_CLASS2_INTERNAL(CLASS, E, S)
418 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P) EXPORT_TEMPLATE_CLASS3_INTERNAL(CLASS, E, S, P)
426 #define CHASTE_CLASS_EXPORT(T)
431 #define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
436 #define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
442 #define EXPORT_TEMPLATE_CLASS1(CLASS, D)
449 #define EXPORT_TEMPLATE_CLASS2(CLASS, E, S)
457 #define EXPORT_TEMPLATE_CLASS3(CLASS, E, S, P)
460 #endif // !defined(CHASTE_CLASS_EXPORT) || defined(CHASTE_SERIALIZATION_CPP)
462 #undef COVERAGE_IGNORE