Chaste
Release::2018.1
|
#include <CellData.hpp>
Public Member Functions | |
virtual | ~CellData () |
void | SetItem (const std::string &rVariableName, double data) |
double | GetItem (const std::string &rVariableName) const |
unsigned | GetNumItems () const |
std::vector< std::string > | GetKeys () const |
Public Member Functions inherited from AbstractCellProperty | |
AbstractCellProperty () | |
virtual | ~AbstractCellProperty () |
template<class CLASS > | |
bool | IsType () const |
template<class BASECLASS > | |
bool | IsSubType () const |
bool | IsSame (const AbstractCellProperty *pOther) const |
bool | IsSame (boost::shared_ptr< const AbstractCellProperty > pOther) const |
void | IncrementCellCount () |
void | DecrementCellCount () |
unsigned | GetCellCount () const |
Public Member Functions inherited from Identifiable | |
virtual | ~Identifiable () |
std::string | GetIdentifier () const |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
std::map< std::string, double > | mCellData |
Friends | |
class | boost::serialization::access |
CellData class.
This cell property allows each cell to store one or more 'named' doubles associated with it, for example corresponding to the intracellular oxygen concentration. Other classes may interrogate or modify the values stored in this class.
Within the Cell constructor, an empty CellData object is created and passed to the Cell (unless there is already a CellData object present in mCellPropertyCollection).
Definition at line 60 of file CellData.hpp.
|
virtual |
We need the empty virtual destructor in this class to ensure Boost serialization works correctly with static libraries.
Definition at line 38 of file CellData.cpp.
double CellData::GetItem | ( | const std::string & | rVariableName | ) | const |
rVariableName | the index of the data required. throws if rVariableName has not been stored |
Definition at line 47 of file CellData.cpp.
std::vector< std::string > CellData::GetKeys | ( | ) | const |
According to STL these are sorted in lexicographical/alphabetic order (so that the ordering here is predictable).
Definition at line 68 of file CellData.cpp.
References mCellData.
unsigned CellData::GetNumItems | ( | ) | const |
|
inlineprivate |
Archive the member variables.
archive | the archive |
version | the current version of this class |
Definition at line 78 of file CellData.hpp.
References mCellData.
void CellData::SetItem | ( | const std::string & | rVariableName, |
double | data | ||
) |
This assigns the cell data.
rVariableName | the name of the data to be set. |
data | the value to set it to. |
Definition at line 42 of file CellData.cpp.
References mCellData.
|
friend |
Needed for serialization.
Definition at line 70 of file CellData.hpp.
|
private |
The cell data.
Definition at line 67 of file CellData.hpp.
Referenced by GetItem(), GetKeys(), GetNumItems(), serialize(), and SetItem().