Chaste
Release::3.4
|
#include <Identifiable.hpp>
Public Member Functions | |
virtual | ~Identifiable () |
std::string | GetIdentifier () const |
Private Member Functions | |
std::string | TidyTemplatedExportIdentifier (std::string identifier) const |
"Mix-in" base class for any class that needs to provide a unique ID specifying what type the derived class is.
All you need to do to use this is inherit from this class at the base of your hierarchy, and provide a Boost Serialization export key for every concrete class. Also, any test in which the GetIdentifier method is used, even via the main cell_based code, must include CheckpointArchiveTypes.hpp or CellBasedSimulationArchiver.hpp as the first Chaste header included. Failure to do so will result in a segmentation fault.
Definition at line 53 of file Identifiable.hpp.
|
virtual |
Virtual destructor to make this class polymorphic.
Definition at line 89 of file Identifiable.cpp.
std::string Identifiable::GetIdentifier | ( | ) | const |
This method uses Boost's serialization's extended_type_info and returns the identifier of the derived class (this is defined when the macro CHASTE_CLASS_EXPORT is invoked in each derived class, and is usually just the name of the class).
Note that you must include the header CheckpointArchiveTypes.hpp in any test suite that calls this method.
Definition at line 93 of file Identifiable.cpp.
References TidyTemplatedExportIdentifier().
Referenced by AbstractCaBasedDivisionRule< SPACE_DIM >::OutputCellCaBasedDivisionRuleInfo(), AbstractCellCycleModel::OutputCellCycleModelInfo(), AbstractCellKiller< DIM >::OutputCellKillerInfo(), AbstractSrnModel::OutputSrnModelInfo(), and AbstractOneStepIvpOdeSolver::Solve().
|
private |
identifier | the identifier to tidy |
Definition at line 46 of file Identifiable.cpp.
Referenced by GetIdentifier().