AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator Class Reference

#include <AbstractMesh.hpp>

Collaboration diagram for AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Node< SPACE_DIM > & operator* ()
Node< SPACE_DIM > * operator-> ()
bool operator!= (const AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator &rOther)
NodeIteratoroperator++ ()
 NodeIterator (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, typename std::vector< Node< SPACE_DIM > * >::iterator nodeIter, bool skipDeletedNodes=true)

Private Member Functions

bool IsAtEnd ()
bool IsAllowedNode ()

Private Attributes

AbstractMeshmrMesh
std::vector< Node< SPACE_DIM >
* >::iterator 
mNodeIter
bool mSkipDeletedNodes


Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator

A smart iterator over the nodes in the mesh.

Definition at line 398 of file AbstractMesh.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::NodeIterator ( AbstractMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh,
typename std::vector< Node< SPACE_DIM > * >::iterator  nodeIter,
bool  skipDeletedNodes = true 
) [inline]

Constructor for a new iterator.

This should not be called directly by user code; use the mesh methods AbstractMesh::GetNodeIteratorBegin and AbstractMesh::GetNodeIteratorEnd instead.

Parameters:
rMesh the mesh to iterator over
nodeIter where to start iterating
skipDeletedNodes whether to include deleted nodes

Definition at line 514 of file AbstractMesh.hpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAllowedNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::mNodes, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mrMesh.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Node< SPACE_DIM > & AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator* (  )  [inline]

Dereference the iterator giving you a *reference* to the current node.

Make sure to use a reference for the result to avoid copying nodes unnecessarily.

Definition at line 482 of file AbstractMesh.hpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAtEnd(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Node< SPACE_DIM > * AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator-> (  )  [inline]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator!= ( const AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator rOther  )  [inline]

Comparison not-equal-to.

Parameters:
rOther iterator with which comparison is made

Definition at line 496 of file AbstractMesh.hpp.

References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator & AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::operator++ (  )  [inline]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAtEnd (  )  [inline, private]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAllowedNode (  )  [inline, private]


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractMesh& AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mrMesh [private]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<Node<SPACE_DIM> *>::iterator AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mNodeIter [private]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::mSkipDeletedNodes [private]

Whether to skip deleted nodes.

Definition at line 446 of file AbstractMesh.hpp.

Referenced by AbstractMesh< ELEMENT_DIM, SPACE_DIM >::NodeIterator::IsAllowedNode().


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

Generated on Mon Nov 1 12:35:46 2010 for Chaste by  doxygen 1.5.5