MOAB: Mesh Oriented datABase  (version 5.2.1)
MBMesquite::IndexIterator Class Reference
+ Inheritance diagram for MBMesquite::IndexIterator:
+ Collaboration diagram for MBMesquite::IndexIterator:

Public Member Functions

 IndexIterator (size_t pStart, size_t pEnd)
virtual ~IndexIterator ()
virtual void restart ()
virtual Mesh::EntityHandle operator* () const
virtual void operator++ ()
 ++iterator
virtual bool is_at_end () const

Private Attributes

size_t mStart
size_t mEnd
size_t mCurrent

Detailed Description

Definition at line 43 of file ArrayMesh.cpp.


Constructor & Destructor Documentation

MBMesquite::IndexIterator::IndexIterator ( size_t  pStart,
size_t  pEnd 
) [inline]

Definition at line 46 of file ArrayMesh.cpp.

: mStart( pStart ), mEnd( pEnd ), mCurrent( pStart ) {}
virtual MBMesquite::IndexIterator::~IndexIterator ( ) [inline, virtual]

Definition at line 47 of file ArrayMesh.cpp.

{}

Member Function Documentation

virtual bool MBMesquite::IndexIterator::is_at_end ( ) const [inline, 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 60 of file ArrayMesh.cpp.

References mCurrent, and mEnd.

    {
        return mEnd - mCurrent <= 1;
    }
virtual Mesh::EntityHandle MBMesquite::IndexIterator::operator* ( ) const [inline, virtual]

*iterator. Return the handle currently being pointed at by the iterator.

Implements MBMesquite::EntityIterator.

Definition at line 52 of file ArrayMesh.cpp.

References mCurrent.

virtual void MBMesquite::IndexIterator::operator++ ( ) [inline, virtual]

++iterator

Implements MBMesquite::EntityIterator.

Definition at line 56 of file ArrayMesh.cpp.

References mCurrent.

    {
        ++mCurrent;
    }
virtual void MBMesquite::IndexIterator::restart ( ) [inline, virtual]

Moves the iterator back to the first entity in the list.

Implements MBMesquite::EntityIterator.

Definition at line 48 of file ArrayMesh.cpp.

References mCurrent, and mStart.

    {
        mCurrent = mStart;
    }

Member Data Documentation

Definition at line 66 of file ArrayMesh.cpp.

Referenced by is_at_end(), operator*(), operator++(), and restart().

Definition at line 66 of file ArrayMesh.cpp.

Referenced by is_at_end().

Definition at line 66 of file ArrayMesh.cpp.

Referenced by restart().

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines