#include <CellPropertyRegistry.hpp>
Public Member Functions | |
template<class SUBCLASS> | |
boost::shared_ptr < AbstractCellProperty > | Get () |
const std::vector < boost::shared_ptr < AbstractCellProperty > > & | rGetAllCellProperties () |
void | Clear () |
CellPropertyRegistry * | TakeOwnership () |
void | SpecifyOrdering (const std::vector< boost::shared_ptr< AbstractCellProperty > > &rOrdering) |
bool | HasOrderingBeenSpecified () |
Static Public Member Functions | |
static CellPropertyRegistry * | Instance () |
Private Member Functions | |
CellPropertyRegistry () | |
CellPropertyRegistry (const CellPropertyRegistry &) | |
CellPropertyRegistry & | operator= (const CellPropertyRegistry &) |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
std::vector< boost::shared_ptr < AbstractCellProperty > > | mCellProperties |
bool | mOrderingHasBeenSpecified |
Static Private Attributes | |
static CellPropertyRegistry * | mpInstance = NULL |
Friends | |
class | boost::serialization::access |
Definition at line 45 of file CellPropertyRegistry.hpp.
CellPropertyRegistry::CellPropertyRegistry | ( | ) | [private] |
Default constructor.
Definition at line 55 of file CellPropertyRegistry.cpp.
CellPropertyRegistry::CellPropertyRegistry | ( | const CellPropertyRegistry & | ) | [private] |
Copy constructor.
boost::shared_ptr< AbstractCellProperty > CellPropertyRegistry::Get | ( | void | ) | [inline] |
The main interface to this class: get a particular cell property object. Use like: boost::shared_ptr<AbstractCellProperty> p_property( CellPropertyRegistry::Instance()->Get<WildTypeCellMutationState>());
Definition at line 144 of file CellPropertyRegistry.hpp.
References mCellProperties.
Referenced by Cell::StartApoptosis().
CellPropertyRegistry * CellPropertyRegistry::Instance | ( | ) | [static] |
Get the single instance of the registry.
Definition at line 35 of file CellPropertyRegistry.cpp.
References mpInstance.
Referenced by CryptCellsGenerator< CELL_CYCLE_MODEL >::Generate(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasic(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasicRandom(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateGivenLocationIndices(), CellPropertyCollection::GetCellPropertyRegistry(), AbstractCryptStatistics::LabelAllCellsAsHealthy(), AbstractCryptStatistics::LabelSPhaseCells(), AbstractCellBasedTestSuite::setUp(), and SimpleOxygenBasedCellCycleModel::UpdateHypoxicDuration().
const std::vector< boost::shared_ptr< AbstractCellProperty > > & CellPropertyRegistry::rGetAllCellProperties | ( | ) |
Get a list of the cell properties registered.
Definition at line 44 of file CellPropertyRegistry.cpp.
References mCellProperties.
void CellPropertyRegistry::Clear | ( | ) |
Clear all registered cell proeprties.
Definition at line 49 of file CellPropertyRegistry.cpp.
References mCellProperties, and mOrderingHasBeenSpecified.
Referenced by CryptCellsGenerator< CELL_CYCLE_MODEL >::Generate(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasic(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasicRandom(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateGivenLocationIndices(), and AbstractCellBasedTestSuite::setUp().
CellPropertyRegistry * CellPropertyRegistry::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 CellBasedSimulation, so that we can have multiple concurrent simulations, each with their own registry.
Definition at line 60 of file CellPropertyRegistry.cpp.
References mpInstance.
void CellPropertyRegistry::SpecifyOrdering | ( | const std::vector< boost::shared_ptr< AbstractCellProperty > > & | rOrdering | ) |
Specify the ordering in which cell properties should be returned by rGetAllCellProperties(). The provided ordering must include all cell properties in the registry. Once an ordering has been specified, attempts to get a cell property which is not in the ordering will throw an exception.
rOrdering | vector of cell properties in the desired order |
Definition at line 66 of file CellPropertyRegistry.cpp.
References EXCEPTION, mCellProperties, and mOrderingHasBeenSpecified.
bool CellPropertyRegistry::HasOrderingBeenSpecified | ( | ) |
Definition at line 88 of file CellPropertyRegistry.cpp.
References mOrderingHasBeenSpecified.
CellPropertyRegistry& CellPropertyRegistry::operator= | ( | const CellPropertyRegistry & | ) | [private] |
Overloaded assignment operator.
void CellPropertyRegistry::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 CellPropertyRegistry.hpp.
References mCellProperties, and mOrderingHasBeenSpecified.
friend class boost::serialization::access [friend] |
Needed for serialization.
Definition at line 128 of file CellPropertyRegistry.hpp.
CellPropertyRegistry * CellPropertyRegistry::mpInstance = NULL [static, private] |
A pointer to the singleton instance of this class.
Definition at line 117 of file CellPropertyRegistry.hpp.
Referenced by Instance(), and TakeOwnership().
std::vector<boost::shared_ptr<AbstractCellProperty> > CellPropertyRegistry::mCellProperties [private] |
The cell properties in the registry.
Definition at line 122 of file CellPropertyRegistry.hpp.
Referenced by Clear(), Get(), rGetAllCellProperties(), serialize(), and SpecifyOrdering().
bool CellPropertyRegistry::mOrderingHasBeenSpecified [private] |
Whether an ordering has been set up
Definition at line 125 of file CellPropertyRegistry.hpp.
Referenced by Clear(), HasOrderingBeenSpecified(), serialize(), and SpecifyOrdering().