#include <CellMutationStateRegistry.hpp>
A singleton registry of available mutation states.
Definition at line 45 of file CellMutationStateRegistry.hpp.
CellMutationStateRegistry::CellMutationStateRegistry | ( | ) | [private] |
Default constructor.
Definition at line 55 of file CellMutationStateRegistry.cpp.
CellMutationStateRegistry::CellMutationStateRegistry | ( | const CellMutationStateRegistry & | ) | [private] |
Copy constructor.
void CellMutationStateRegistry::Clear | ( | ) |
Clear all registered mutation states.
Definition at line 49 of file CellMutationStateRegistry.cpp.
References mMutationStates, and mOrderingHasBeenSpecified.
Referenced by CryptCellsGenerator< CELL_CYCLE_MODEL >::Generate(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasic(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateGivenLocationIndices(), and AbstractCellBasedTestSuite::setUp().
boost::shared_ptr< AbstractCellMutationState > CellMutationStateRegistry::Get | ( | void | ) | [inline] |
The main interface to this class: get a particular mutation state object. Use like: boost::shared_ptr<AbstractCellMutationState> p_state( CellMutationStateRegistry::Instance()->Get<WildTypeCellMutationState>());
Definition at line 144 of file CellMutationStateRegistry.hpp.
References mMutationStates, and mOrderingHasBeenSpecified.
bool CellMutationStateRegistry::HasOrderingBeenSpecified | ( | ) |
Definition at line 87 of file CellMutationStateRegistry.cpp.
References mOrderingHasBeenSpecified.
CellMutationStateRegistry * CellMutationStateRegistry::Instance | ( | ) | [static] |
Get the single instance of the registry.
Definition at line 35 of file CellMutationStateRegistry.cpp.
References mpInstance.
Referenced by CryptCellsGenerator< CELL_CYCLE_MODEL >::Generate(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasic(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateGivenLocationIndices(), AbstractCryptStatistics::LabelAllCellsAsHealthy(), AbstractCryptStatistics::LabelSPhaseCells(), and AbstractCellBasedTestSuite::setUp().
CellMutationStateRegistry& CellMutationStateRegistry::operator= | ( | const CellMutationStateRegistry & | ) | [private] |
Overloaded assignment operator.
const std::vector< boost::shared_ptr< AbstractCellMutationState > > & CellMutationStateRegistry::rGetAllMutationStates | ( | ) |
Get a list of the mutation states registered.
Definition at line 44 of file CellMutationStateRegistry.cpp.
References mMutationStates.
void CellMutationStateRegistry::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the member variables.
archive | the archive | |
version | the current version of this class |
Definition at line 136 of file CellMutationStateRegistry.hpp.
References mMutationStates, and mOrderingHasBeenSpecified.
void CellMutationStateRegistry::SpecifyOrdering | ( | const std::vector< boost::shared_ptr< AbstractCellMutationState > > & | rOrdering | ) |
Specify the ordering in which mutation states should be returned by rGetAllMutationStates(). The provided ordering must include all mutation states in the registry. Once an ordering has been specified attempts to get a mutation state which is not in the ordering will throw an exception.
rOrdering | vector of mutation states in the desired order |
Definition at line 67 of file CellMutationStateRegistry.cpp.
References mMutationStates, and mOrderingHasBeenSpecified.
CellMutationStateRegistry * CellMutationStateRegistry::TakeOwnership | ( | ) |
Take ownership of the current registry. Calling Instance after this will create a new registry. The caller takes responsibility for freeing the returned registry when finished with it.
This method is intended for use by TissueSimulation, so that we can have multiple concurrent simulations, each with their own registry.
Definition at line 61 of file CellMutationStateRegistry.cpp.
References mpInstance.
friend class boost::serialization::access [friend] |
Needed for serialization.
Definition at line 128 of file CellMutationStateRegistry.hpp.
std::vector<boost::shared_ptr<AbstractCellMutationState> > CellMutationStateRegistry::mMutationStates [private] |
The mutation states in the registry.
Definition at line 122 of file CellMutationStateRegistry.hpp.
Referenced by Clear(), Get(), rGetAllMutationStates(), serialize(), and SpecifyOrdering().
Whether an ordering has been set up
Definition at line 125 of file CellMutationStateRegistry.hpp.
Referenced by Clear(), Get(), HasOrderingBeenSpecified(), serialize(), and SpecifyOrdering().
CellMutationStateRegistry * CellMutationStateRegistry::mpInstance = NULL [static, private] |
A pointer to the singleton instance of this class.
Definition at line 117 of file CellMutationStateRegistry.hpp.
Referenced by Instance(), and TakeOwnership().