Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
CellData Class Reference

#include <CellData.hpp>

+ Inheritance diagram for CellData:
+ Collaboration diagram for CellData:

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
 
bool HasItem (const std::string &rVariableName) 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, doublemCellData
 

Friends

class boost::serialization::access
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~CellData()

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.

Member Function Documentation

◆ GetItem()

double CellData::GetItem ( const std::string &  rVariableName) const
Returns
data.
Parameters
rVariableNamethe index of the data required. throws if rVariableName has not been stored

Definition at line 47 of file CellData.cpp.

References EXCEPTION, and mCellData.

◆ GetKeys()

std::vector< std::string > CellData::GetKeys ( ) const
Returns
all keys.

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.

◆ GetNumItems()

unsigned CellData::GetNumItems ( ) const
Returns
number of data items

Definition at line 63 of file CellData.cpp.

References mCellData.

◆ HasItem()

bool CellData::HasItem ( const std::string &  rVariableName) const

Check if data with given name is stored.

Parameters
rVariableNamerVariableName the index of the data required.
Returns
if rVariableName has been stored

Definition at line 80 of file CellData.cpp.

References mCellData.

◆ serialize()

template<class Archive >
void CellData::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 78 of file CellData.hpp.

References mCellData.

◆ SetItem()

void CellData::SetItem ( const std::string &  rVariableName,
double  data 
)

This assigns the cell data.

Parameters
rVariableNamethe name of the data to be set.
datathe value to set it to.

Definition at line 42 of file CellData.cpp.

References mCellData.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 70 of file CellData.hpp.

Member Data Documentation

◆ mCellData

std::map<std::string, double> CellData::mCellData
private

The cell data.

Definition at line 67 of file CellData.hpp.

Referenced by GetItem(), GetKeys(), GetNumItems(), HasItem(), serialize(), and SetItem().


The documentation for this class was generated from the following files: