The HepConstAListIterator is used in the same way as the
HepAListIterator
class but can also be used with
HepConstAList
and it only returns const pointers to objects.
HepConstAListIterator was developed from an original
(non-template) list iterator class written by Dag Bruck.
Author
Leif Lonnblad
See also
HepAListBase,
HepAList,
HepCList,
HepConstAList,
HepAListIteratorBase,
HepAListIterator,
HepCListIterator.
Declaration
#include "CLHEP/Alist/ConstAIterator.h"
template <class T>
class HepConstAListIterator : public HepAListIteratorBase
Public Member Functions
- Constructor
- inline HepConstAListIterator(const HepAList<T> &)
- inline HepConstAListIterator(const HepConstAList<T> &)
- Constructor taking a corresponding list as argument.
Starting at the first element.
- Copy constructor
- inline HepConstAListIterator
(const HepConstAListIterator<T> &)
- Destructor
- inline ~HepConstAListIterator()
- ()
- inline const T * operator () ()
- Returns a pointer to the current object in the associated list,
moving forward to the next.
- Returns 0 if all objects are done.
- current
- inline const T * current() const
- Returns a pointer to the current object in the associated list,
without incrementing the index.
- next
- inline const T * next()
- Returns a pointer to the current object in the associated list,
moving forward to the next.
- Returns 0 if all objects are done.
- prev
- inline const T * prev()
- Moves backward one step in the list and returns the object found there.
- If current object is the first in the list, no stepping is done and
0 is returned.
24 September 1997
EVC