VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator Class Reference

#include <VertexMesh.hpp>

Collaboration diagram for VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

VertexElement< ELEMENT_DIM,
SPACE_DIM > & 
operator* ()
VertexElement< ELEMENT_DIM,
SPACE_DIM > * 
operator-> ()
bool operator!= (const VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator &rOther)
VertexElementIteratoroperator++ ()
 VertexElementIterator (VertexMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, typename std::vector< VertexElement< ELEMENT_DIM, SPACE_DIM > * >::iterator elementIter, bool skipDeletedElements=true)

Private Member Functions

bool IsAtEnd ()
bool IsAllowedElement ()

Private Attributes

VertexMeshmrMesh
std::vector< VertexElement
< ELEMENT_DIM, SPACE_DIM >
* >::iterator 
mElementIter
bool mSkipDeletedElements


Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator

A smart iterator over the elements in the mesh.

Todo:
This is the same as in AbstractTetrahedralMesh - merge? (#1379)

Definition at line 526 of file VertexMesh.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::VertexElementIterator ( VertexMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh,
typename std::vector< VertexElement< ELEMENT_DIM, SPACE_DIM > * >::iterator  elementIter,
bool  skipDeletedElements = true 
) [inline]

Constructor for a new iterator.

This should not be called directly by user code; use the mesh methods AbstractTetrahedralMesh::GetElementIteratorBegin and AbstractTetrahedralMesh::GetElementIteratorEnd instead.

Parameters:
rMesh the mesh to iterator over
elementIter where to start iterating
skipDeletedElements whether to include deleted elements

Definition at line 643 of file VertexMesh.hpp.

References VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::IsAllowedElement(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::mElementIter, VertexMesh< ELEMENT_DIM, SPACE_DIM >::mElements, and VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::mrMesh.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexElement< ELEMENT_DIM, SPACE_DIM > & VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::operator* (  )  [inline]

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

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

Definition at line 611 of file VertexMesh.hpp.

References VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::IsAtEnd(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::mElementIter.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexElement< ELEMENT_DIM, SPACE_DIM > * VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::operator-> (  )  [inline]

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

Comparison not-equal-to.

Parameters:
rOther iterator with which comparison is made

Definition at line 625 of file VertexMesh.hpp.

References VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::mElementIter.

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

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::IsAllowedElement (  )  [inline, private]


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexMesh& VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::mrMesh [private]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<VertexElement<ELEMENT_DIM, SPACE_DIM> *>::iterator VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::mElementIter [private]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::mSkipDeletedElements [private]

Whether to skip deleted elements.

Definition at line 575 of file VertexMesh.hpp.

Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexElementIterator::IsAllowedElement().


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

Generated on Mon Nov 1 12:37:34 2010 for Chaste by  doxygen 1.5.5