#include <boost/version.hpp>
#include <boost/serialization/export.hpp>
Go to the source code of this file.
Classes | |
struct | pack< void(T)> |
Defines | |
#define | COVERAGE_IGNORE |
gcov doesn't like this file... |
Defines some macros to register versions of templated classes with the serialization library, for all space dimensions. Also contains wrappers around BOOST_CLASS_EXPORT and related functionality, which take care of the differences introduced in new versions of Boost.
In Boost 1.33.1 and 1.34, BOOST_CLASS_EXPORT should be placed in the .hpp file for each class, and archive headers included only in tests, or special 'archiver' class header files (e.g. CardiacSimulationArchiver.hpp).
Serialization is broken in Boost 1.35.
In Boost 1.36 (and up to 1.40) both the archive header includes and the BOOST_CLASS_EXPORT should go in .cpp files.
We support 1.41 and above, which introduce BOOST_CLASS_EXPORT_KEY and BOOST_CLASS_EXPORT_IMPLEMENT. Note 1.41.1 has bugs in serialization and 1.48 is the current recommended one.
To handle all situations in Chaste: 1. In .hpp files, include this header after the class definition. 2. In .cpp files, after any other includes, include SerializationExportWrapperForCpp.hpp. In both cases, CHASTE_CLASS_EXPORT should be used instead of BOOST_CLASS_EXPORT.
There are also variant macros for common cases of templated classes:
The latter 3 macros are usable in any situation where a class has up to 3 template parameters, and you know what values will be needed. Unfortunately a fully general template solution seems to be impossible in any Boost version (the library makes use of either explicit instantiation or singleton class instantiation).
Definition in file SerializationExportWrapper.hpp.