Mesh Oriented datABase  (version 5.5.0)
An array-based unstructured mesh library
moab::Range::const_reverse_iterator Class Reference

a const reverse iterator which iterates over an Range More...

#include <Range.hpp>

+ Inheritance diagram for moab::Range::const_reverse_iterator:
+ Collaboration diagram for moab::Range::const_reverse_iterator:

Public Member Functions

 const_reverse_iterator ()
 default constructor - intialize base default constructor More...
 
 const_reverse_iterator (const_iterator fwd_iter)
 
 const_reverse_iterator (const PairNode *iter, const EntityHandle val)
 constructor used by Range More...
 
const EntityHandleoperator* () const
 dereference that value this iterator points to returns a const reference More...
 
const_reverse_iteratoroperator++ ()
 prefix incrementer More...
 
const_reverse_iterator operator++ (int)
 postfix incrementer More...
 
const_reverse_iteratoroperator-- ()
 prefix decrementer More...
 
const_reverse_iterator operator-- (int)
 postfix decrementer More...
 
const_reverse_iteratoroperator+= (EntityID step)
 Advance iterator specified amount. Potentially O(n), but typically better. Always more efficient than calling operator++ step times. More...
 
const_reverse_iteratoroperator-= (EntityID step)
 Regress iterator specified amount. Potentially O(n), but typically better. Always more efficient than calling operator-- step times. More...
 
bool operator== (const const_reverse_iterator &other) const
 equals operator More...
 
bool operator!= (const const_reverse_iterator &other) const
 not equals operator More...
 

Protected Attributes

const_iterator myIter
 the node we are pointing at More...
 

Friends

class Range
 
class pair_iterator
 

Additional Inherited Members

- Public Types inherited from moab::range_base_iter
typedef range_iter_tag iterator_category
 
typedef EntityID difference_type
 
typedef EntityHandle value_type
 
typedef EntityHandlepointer
 
typedef EntityHandlereference
 

Detailed Description

a const reverse iterator which iterates over an Range

Definition at line 599 of file Range.hpp.

Constructor & Destructor Documentation

◆ const_reverse_iterator() [1/3]

moab::Range::const_reverse_iterator::const_reverse_iterator ( )
inline

default constructor - intialize base default constructor

Definition at line 606 of file Range.hpp.

606 {}

◆ const_reverse_iterator() [2/3]

moab::Range::const_reverse_iterator::const_reverse_iterator ( const_iterator  fwd_iter)
inline

Definition at line 608 of file Range.hpp.

608 : myIter( fwd_iter ) {}

◆ const_reverse_iterator() [3/3]

moab::Range::const_reverse_iterator::const_reverse_iterator ( const PairNode iter,
const EntityHandle  val 
)
inline

constructor used by Range

Definition at line 611 of file Range.hpp.

611 : myIter( iter, val ) {}

Member Function Documentation

◆ operator!=()

bool moab::Range::const_reverse_iterator::operator!= ( const const_reverse_iterator other) const
inline

not equals operator

Definition at line 671 of file Range.hpp.

672  {
673  return myIter != other.myIter;
674  }

References myIter.

◆ operator*()

const EntityHandle& moab::Range::const_reverse_iterator::operator* ( ) const
inline

dereference that value this iterator points to returns a const reference

Definition at line 615 of file Range.hpp.

616  {
617  return *myIter;
618  }

◆ operator++() [1/2]

const_reverse_iterator& moab::Range::const_reverse_iterator::operator++ ( )
inline

prefix incrementer

Definition at line 621 of file Range.hpp.

622  {
623  --myIter;
624  return *this;
625  }

◆ operator++() [2/2]

const_reverse_iterator moab::Range::const_reverse_iterator::operator++ ( int  )
inline

postfix incrementer

Definition at line 628 of file Range.hpp.

629  {
630  return const_reverse_iterator( myIter-- );
631  }

◆ operator+=()

const_reverse_iterator& moab::Range::const_reverse_iterator::operator+= ( EntityID  step)
inline

Advance iterator specified amount. Potentially O(n), but typically better. Always more efficient than calling operator++ step times.

Definition at line 649 of file Range.hpp.

650  {
651  myIter -= step;
652  return *this;
653  }

◆ operator--() [1/2]

const_reverse_iterator& moab::Range::const_reverse_iterator::operator-- ( )
inline

prefix decrementer

Definition at line 634 of file Range.hpp.

635  {
636  ++myIter;
637  return *this;
638  }

◆ operator--() [2/2]

const_reverse_iterator moab::Range::const_reverse_iterator::operator-- ( int  )
inline

postfix decrementer

Definition at line 641 of file Range.hpp.

642  {
643  return const_reverse_iterator( myIter++ );
644  }

◆ operator-=()

const_reverse_iterator& moab::Range::const_reverse_iterator::operator-= ( EntityID  step)
inline

Regress iterator specified amount. Potentially O(n), but typically better. Always more efficient than calling operator-- step times.

Definition at line 658 of file Range.hpp.

659  {
660  myIter += step;
661  return *this;
662  }

◆ operator==()

bool moab::Range::const_reverse_iterator::operator== ( const const_reverse_iterator other) const
inline

equals operator

Definition at line 665 of file Range.hpp.

666  {
667  return myIter == other.myIter;
668  }

References myIter.

Friends And Related Function Documentation

◆ pair_iterator

friend class pair_iterator
friend

Definition at line 602 of file Range.hpp.

◆ Range

friend class Range
friend

Definition at line 601 of file Range.hpp.

Member Data Documentation

◆ myIter

const_iterator moab::Range::const_reverse_iterator::myIter
protected

the node we are pointing at

Definition at line 678 of file Range.hpp.

Referenced by operator!=(), and operator==().


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