MOAB: Mesh Oriented datABase
(version 5.4.1)
|
ElementIterator for MeshImpl. More...
#include <MeshImplData.hpp>
Public Member Functions | |
MeshImplElemIter (MeshImplData *data) | |
virtual | ~MeshImplElemIter () |
virtual void | restart () |
virtual void | operator++ () |
++iterator | |
virtual Mesh::ElementHandle | operator* () const |
virtual bool | is_at_end () const |
Private Attributes | |
MeshImplData * | mesh |
size_t | index |
ElementIterator for MeshImpl.
Iterate over valid element indices
Definition at line 281 of file MeshImplData.hpp.
MBMesquite::MeshImplElemIter::MeshImplElemIter | ( | MeshImplData * | data | ) | [inline] |
Definition at line 288 of file MeshImplData.hpp.
References restart().
MBMesquite::MeshImplElemIter::~MeshImplElemIter | ( | ) | [virtual] |
Definition at line 765 of file MeshImplData.cpp.
{}
bool MBMesquite::MeshImplElemIter::is_at_end | ( | ) | const [virtual] |
Returns false until the iterator has been advanced PAST the last entity. Once is_at_end() returns true, *iterator returns 0.
Implements MBMesquite::EntityIterator.
Definition at line 785 of file MeshImplData.cpp.
References index, MBMesquite::MeshImplData::max_element_index(), and mesh.
{ return index >= mesh->max_element_index(); }
Mesh::ElementHandle MBMesquite::MeshImplElemIter::operator* | ( | ) | const [virtual] |
*iterator. Return the handle currently being pointed at by the iterator.
Implements MBMesquite::EntityIterator.
Definition at line 780 of file MeshImplData.cpp.
References index.
{ return reinterpret_cast< Mesh::ElementHandle >( index ); }
void MBMesquite::MeshImplElemIter::operator++ | ( | ) | [virtual] |
++iterator
Implements MBMesquite::EntityIterator.
Definition at line 773 of file MeshImplData.cpp.
References index, MBMesquite::MeshImplData::is_element_valid(), and mesh.
{ ++index; while( index < mesh->max_element_index() && !mesh->is_element_valid( index ) ) ++index; }
void MBMesquite::MeshImplElemIter::restart | ( | ) | [virtual] |
Moves the iterator back to the first entity in the list.
Implements MBMesquite::EntityIterator.
Definition at line 767 of file MeshImplData.cpp.
References index, MBMesquite::MeshImplData::is_element_valid(), and mesh.
Referenced by MeshImplElemIter().
{ index = 0; if( !mesh->is_element_valid( index ) ) operator++(); }
size_t MBMesquite::MeshImplElemIter::index [private] |
Definition at line 285 of file MeshImplData.hpp.
Referenced by is_at_end(), operator*(), operator++(), and restart().
MeshImplData* MBMesquite::MeshImplElemIter::mesh [private] |
Definition at line 284 of file MeshImplData.hpp.
Referenced by is_at_end(), operator++(), and restart().