BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
ConstAIterator.h
Go to the documentation of this file.
1// -*- C++ -*-
2// CLASSDOC OFF
3// $Id: ConstAIterator.h,v 1.2 2010/03/25 09:55:57 zhangy Exp $
4// CLASSDOC ON
5//
6// This file is a part of what might beome the CLHEP -
7// a Class Library for High Energy Physics.
8//
9// This is the definition of the HepConstAListIterator class. It is used
10// in the same way as the HepAListIterator class but can also be used with
11// HepConstAList and it only returns const pointers to objects.
12//
13// .SS
14// AList.h, ConstAList.h, AIterator.h, AListBase.h, AIteratorBase.h
15//
16// .SS History
17// HepConstAListIterator was developed from an original (non-template) list
18// iterator class written by Dag Bruck.
19//
20// Author: Leif Lonnblad
21//
22
23#ifndef _CONSTAITERATOR_H_
24#define _CONSTAITERATOR_H_
25
26#include "MdcRecoUtil/AIteratorBase.h"
28
29#ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
30#define inline
31#endif
32
33template <class T>
34class HepConstAListIterator : public HepAListIteratorBase {
35
36public:
37
40 // Constructor taking a corresponding list as argument. Starting at the
41 // first element.
42
44 // Copy constructor.
45
47
48 inline const T * operator () ();
49 inline const T * next();
50 // Returns a pointer to the current object in the associated list, moving
51 // forward to the next. Returns 0 if all objects are done.
52
53 inline const T * prev();
54 // Moves backward one step in the list and returns the object found there.
55 // If current object is the first in the list, no stepping is done and 0 is
56 // returned.
57
58 inline const T * current() const;
59 // Returns a pointer to the current object in the associated list,
60 // without incrementing the index.
61
62};
63
64#ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
65#undef inline
66#endif
67
68#ifdef HEP_SHORT_NAMES
69#define CAIterator HepConstAListIterator
70#endif
71
72#include "MdcRecoUtil/ConstAIterator.icc"
73
74#endif // _ALISTITERATOR_H_
const T * operator()()
const T * current() const
HepConstAListIterator(const HepConstAList< T > &)
HepConstAListIterator(const HepConstAListIterator< T > &)
HepConstAListIterator(const HepAList< T > &)