#include <CellData.hpp>
Inherits AbstractCellProperty.
Public Member Functions | |
virtual | ~CellData () |
void | SetItem (const std::string &variableName, double data) |
double | GetItem (const std::string &variableName) const |
unsigned | GetNumItems () const |
std::vector< std::string > | GetKeys () 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' variables associated with it, for example corresponding to the intracellular oxygen concentration. Other classes may interrogate or modify the values stored in this class.
Each Cell owns a CellData property.
Definition at line 61 of file CellData.hpp.
CellData::~CellData | ( | ) | [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 & | variableName | ) | const |
variableName | the index of the data required. |
Definition at line 47 of file CellData.cpp.
References DOUBLE_UNSET, EXCEPTION, and mCellData.
std::vector< std::string > CellData::GetKeys | ( | ) | const |
These are sorted in lexicographical/alphabetic order (so that the order is independent of any map iteration method).
Definition at line 72 of file CellData.cpp.
References mCellData.
unsigned CellData::GetNumItems | ( | ) | const |
void CellData::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented from AbstractCellProperty.
Definition at line 79 of file CellData.hpp.
References mCellData.
void CellData::SetItem | ( | const std::string & | variableName, | |
double | data | |||
) |
This assigns the cell data.
variableName | the index of the data to be set. | |
data | the value to set it to. |
Definition at line 42 of file CellData.cpp.
References mCellData.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractCellProperty.
Definition at line 71 of file CellData.hpp.
std::map<std::string, double> CellData::mCellData [private] |
The cell data.
Definition at line 68 of file CellData.hpp.
Referenced by GetItem(), GetKeys(), GetNumItems(), serialize(), and SetItem().