CellData Class Reference

#include <CellData.hpp>

Inherits AbstractCellProperty.

Collaboration diagram for CellData:
Collaboration graph
[legend]

List of all members.

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, doublemCellData

Friends

class boost::serialization::access

Detailed Description

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.


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.


Member Function Documentation

double CellData::GetItem ( const std::string &  variableName  )  const
Returns:
data.
Parameters:
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
Returns:
all keys.

These are sorted in lexicographical/alphabetic order (so that the order is independent of any map iteration method).

Todo:
Note: Does the order of the keys matter? If so, then sort the vector + Doxygen

Definition at line 72 of file CellData.cpp.

References mCellData.

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

Definition at line 67 of file CellData.cpp.

References mCellData.

template<class Archive >
void CellData::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archive the member variables.

Parameters:
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.

Parameters:
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.


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractCellProperty.

Definition at line 71 of file CellData.hpp.


Member Data Documentation

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().


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

Generated by  doxygen 1.6.2