Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator Class Reference

#include <AbstractCellPopulation.hpp>

+ Collaboration diagram for AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator:

Public Member Functions

CellPtr operator* ()
 
CellPtr operator-> ()
 
bool operator!= (const typename AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator &rOther)
 
Iteratoroperator++ ()
 
 Iterator (AbstractCellPopulation &rCellPopulation, std::list< CellPtr >::iterator cellIter)
 
virtual ~Iterator ()
 

Private Member Functions

virtual bool IsRealCell ()
 
bool IsAtEnd ()
 

Private Attributes

AbstractCellPopulationmrCellPopulation
 
std::list< CellPtr >::iterator mCellIter
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator

Iterator class allows one to iterate over cells in the cell population. Dereferencing the iterator will give you the current cell. There are also methods to get the node representing this cell, and the location of that node.

Definition at line 968 of file AbstractCellPopulation.hpp.

Constructor & Destructor Documentation

◆ Iterator()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::Iterator ( AbstractCellPopulation rCellPopulation,
std::list< CellPtr >::iterator  cellIter 
)

◆ ~Iterator()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::~Iterator ( )
inlinevirtual

The iterator must have a virtual destructor.

Definition at line 1010 of file AbstractCellPopulation.hpp.

Member Function Documentation

◆ IsAtEnd()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::IsAtEnd ( )
inlineprivate

Private helper function.

Returns
whether we're at the end of the cells.

Definition at line 1093 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::operator*().

◆ IsRealCell()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::IsRealCell ( )
inlineprivatevirtual

Private helper function.

Returns
whether we're pointing at a real cell. Assumes we are within range (i.e. not at End).

Real cells are not deleted.

Definition at line 1087 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::Iterator().

◆ operator!=()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::operator!= ( const typename AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator rOther)
inline

Comparison not-equal-to.

Parameters
rOtheriterator with which comparison is made
Returns
not-equal

Definition at line 1069 of file AbstractCellPopulation.hpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::mCellIter.

◆ operator*()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
CellPtr AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::operator* ( )
inline

Dereference the iterator giving you a pointer to the current cell.

Returns
reference

Definition at line 1055 of file AbstractCellPopulation.hpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::IsAtEnd(), and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::mCellIter.

◆ operator++()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator & AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::operator++ ( )
inline

Prefix increment operator.

Returns
incremented object

Definition at line 1075 of file AbstractCellPopulation.hpp.

◆ operator->()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
CellPtr AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::operator-> ( )
inline

Unusually for an iterator over a collection of pointers, this method allows you to access the object pointed at, rather than the pointer itself.

Returns
pointer

Definition at line 1062 of file AbstractCellPopulation.hpp.

Member Data Documentation

◆ mCellIter

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::list<CellPtr>::iterator AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::mCellIter
private

◆ mrCellPopulation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellPopulation& AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::mrCellPopulation
private

The cell population member.

Definition at line 1031 of file AbstractCellPopulation.hpp.

Referenced by AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Iterator::Iterator().


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