Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
|
#include <boost/version.hpp>
#include <boost/serialization/is_abstract.hpp>
Go to the source code of this file.
Macros | |
#define | CLASS_IS_ABSTRACT(T) BOOST_IS_ABSTRACT(T) |
#define | TEMPLATED_CLASS_IS_ABSTRACT_DEFN |
#define | TEMPLATED_CLASS_IS_ABSTRACT_1_UNSIGNED(T) |
#define | TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED(T) |
#define | TEMPLATED_CLASS_IS_ABSTRACT_3_UNSIGNED(T) |
This file defines 4 macros to assist with explicitly declaring to the Boost Serialization library when a class is abstract. The interface for doing this changed in Boost 1.36.0, hence this wrapper.
The easy case is for a non-templated class. For example, if you have a class called AbstractClass, use CLASS_IS_ABSTRACT(AbstractClass)
For classes templated over either 1 or 2 unsigned parameters, there are helper macros TEMPLATED_CLASS_IS_ABSTRACT_1_UNSIGNED and TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED. For example, with a class template<unsigned SPACE_DIM, unsigned ELEMENT_DIM> class AbstractTemplatedClass { ... }; use TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED(AbstractTemplatedClass)
For a general templated class, you have to do a little extra work. For example, with a class template<class C, unsigned U> class AbstractTemplatedClass { ... }; use namespace boost { namespace serialization { template<class C, unsigned U> struct is_abstract<AbstractTemplatedClass<C, U> > TEMPLATED_CLASS_IS_ABSTRACT_DEFN template<class C, unsigned U> struct is_abstract<const AbstractTemplatedClass<C, U> > TEMPLATED_CLASS_IS_ABSTRACT_DEFN }}
(see AbstractCardiacCellWithModifiers for an example of this last case).
Definition in file ClassIsAbstract.hpp.
#define CLASS_IS_ABSTRACT | ( | T | ) | BOOST_IS_ABSTRACT(T) |
Explicitly mark a non-templated class as being abstract (Boost 1.35 and earlier).
T | the class |
Definition at line 107 of file ClassIsAbstract.hpp.
#define TEMPLATED_CLASS_IS_ABSTRACT_1_UNSIGNED | ( | T | ) |
Convenience macro to declare a class templated over a single unsigned as abstract.
T | the class |
Definition at line 126 of file ClassIsAbstract.hpp.
#define TEMPLATED_CLASS_IS_ABSTRACT_2_UNSIGNED | ( | T | ) |
Convenience macro to declare a class templated over 2 unsigneds as abstract.
T | the class |
Definition at line 142 of file ClassIsAbstract.hpp.
#define TEMPLATED_CLASS_IS_ABSTRACT_3_UNSIGNED | ( | T | ) |
Convenience macro to declare a class templated over 3 unsigneds as abstract.
T | the class |
Definition at line 158 of file ClassIsAbstract.hpp.
#define TEMPLATED_CLASS_IS_ABSTRACT_DEFN |
Content of the is_abstract type to mark a templated class as abstract (Boost 1.35 and earlier).
Definition at line 113 of file ClassIsAbstract.hpp.