BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Attributes | List of all members
Bempp::EntityIterator< codim > Class Template Referenceabstract

Abstract base class for iterators over entities. More...

#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/grid/entity_iterator.hpp>

Inheritance diagram for Bempp::EntityIterator< codim >:
Bempp::EntityPointer< codim >

Public Member Functions

virtual void next ()=0
 Increment iterator.
 
bool finished () const
 True if iterator points past the end of the iteration range.
 
virtual const Entity< codim > & entity () const =0
 Read-only access to the entity referenced by the iterator.
 
virtual std::auto_ptr
< EntityPointer< codim > > 
frozen () const =0
 A stable pointer to the entity currently referenced by the iterator. More...
 
- Public Member Functions inherited from Bempp::EntityPointer< codim >
virtual ~EntityPointer ()
 Destructor.
 

Protected Attributes

bool m_finished
 

Additional Inherited Members

- Public Types inherited from Bempp::EntityPointer< codim >
enum  { codimension = codim }
 Entity codimension.
 

Detailed Description

template<int codim>
class Bempp::EntityIterator< codim >

Abstract base class for iterators over entities.

Parameters
codimCodimension of the entities iterated over.

Typical usage (here ConcreteEntityIterator is some subclass of EntityIterator<codim>):

ConcreteEntityIterator* it = ...();
while (!it->finished())
{
const ConcreteEntity& e = it.entity();
do_stuff(e);
it->next();
}
delete it;

Member Function Documentation

template<int codim>
virtual std::auto_ptr<EntityPointer<codim> > Bempp::EntityIterator< codim >::frozen ( ) const
pure virtual

A stable pointer to the entity currently referenced by the iterator.

The returned pointer is guaranteed to keep referring to the same entity even if the iterator is incremented or destroyed, as long as the grid is not adapted and the grid object itself stays alive.

Implemented in Bempp::ConcreteSubentityIterator< DuneEntity, codimSub >, and Bempp::ConcreteRangeEntityIterator< DuneEntityIt, DuneEntityPointer >.


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