MOAB: Mesh Oriented datABase  (version 5.4.1)
MBMesquite::MeshImplVertIter Class Reference

VertexIterator for MeshImpl. More...

#include <MeshImplData.hpp>

+ Inheritance diagram for MBMesquite::MeshImplVertIter:
+ Collaboration diagram for MBMesquite::MeshImplVertIter:

Public Member Functions

 MeshImplVertIter (MeshImplData *data)
virtual ~MeshImplVertIter ()
virtual void restart ()
virtual void operator++ ()
 ++iterator
virtual Mesh::VertexHandle operator* () const
virtual bool is_at_end () const

Private Attributes

MeshImplDatamesh
size_t index

Detailed Description

VertexIterator for MeshImpl.

Iterate over valid vertex indices

Definition at line 254 of file MeshImplData.hpp.


Constructor & Destructor Documentation

Definition at line 261 of file MeshImplData.hpp.

References restart().

                                           : mesh( data )
    {
        restart();
    }

Definition at line 740 of file MeshImplData.cpp.

{}

Member Function Documentation

bool MBMesquite::MeshImplVertIter::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 760 of file MeshImplData.cpp.

References index, MBMesquite::MeshImplData::max_vertex_index(), and mesh.

{
    return index >= mesh->max_vertex_index();
}
Mesh::VertexHandle MBMesquite::MeshImplVertIter::operator* ( ) const [virtual]

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

Implements MBMesquite::EntityIterator.

Definition at line 755 of file MeshImplData.cpp.

References index.

{
    return reinterpret_cast< Mesh::VertexHandle >( index );
}
void MBMesquite::MeshImplVertIter::operator++ ( ) [virtual]

++iterator

Implements MBMesquite::EntityIterator.

Definition at line 748 of file MeshImplData.cpp.

References index, MBMesquite::MeshImplData::is_corner_node(), MBMesquite::MeshImplData::is_vertex_valid(), and mesh.

{
    ++index;
    while( index < mesh->max_vertex_index() && ( !mesh->is_vertex_valid( index ) || !mesh->is_corner_node( index ) ) )
        ++index;
}

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

Implements MBMesquite::EntityIterator.

Definition at line 742 of file MeshImplData.cpp.

References index, MBMesquite::MeshImplData::is_vertex_valid(), and mesh.

Referenced by MeshImplVertIter().

{
    index = 0;
    if( !mesh->is_vertex_valid( index ) ) operator++();
}

Member Data Documentation

Definition at line 258 of file MeshImplData.hpp.

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

Definition at line 257 of file MeshImplData.hpp.

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

List of all members.


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