Chaste  Release::2017.1
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
 
- 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 ( )
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.

Referenced by serialize().

Member Function Documentation

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.

Referenced by serialize().

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 CHASTE_CLASS_EXPORT, and mCellData.

Referenced by serialize().

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

Definition at line 63 of file CellData.cpp.

References mCellData.

Referenced by 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 CHASTE_CLASS_EXPORT, GetItem(), GetKeys(), GetNumItems(), mCellData, SetItem(), and ~CellData().

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.

Referenced by serialize().

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 70 of file CellData.hpp.

Member Data Documentation

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

The cell data.

Definition at line 67 of file CellData.hpp.

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


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