PandaRoot
RhoCandListIterator.h
Go to the documentation of this file.
1 #ifndef RHOCANDLISTITERATOR_H
2 #define RHOCANDLISTITERATOR_H
3 // //
5 // RhoCandListIterator //
6 // //
7 // Iterator class for RhoCandList //
8 // //
9 // Author List: //
10 // Marcel Kunze, RUB, Feb. 99 //
11 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
12 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
13 // //
15 
16 #include "TObject.h"
17 
18 class RhoCandidate;
19 class RhoCandList;
20 
21 class RhoCandListIterator : public TObject {
22 
23  public:
25  // Constructor taking a corresponding list as argument. Starting at the
26  // first element.
27 
29  // Copy constructor.
30 
32 
33  RhoCandidate *Next();
34  // Returns a pointer to the current object in the associated list, moving
35  // forward to the next. Returns 0 if all objects are done.
36 
38  // Moves backward one step in the list and returns the object found there.
39  // If current object is the first in the list, no stepping is done and 0 is
40  // returned.
41 
43  // Returns a pointer to the current object in the associated list,
44  // without incrementing the index.
45 
46  // public:
47 
48  int Index() const;
49 
50  void Rewind();
51  // Rewinds the iterator to the first element of the list.
52 
53  void Skip(int);
54  // Move iterator forward or backward.
55 
56  void SkipAll();
57  // Move iterator past last element.
58 
59  private:
60  RhoCandList *fList;
61 
62  int fCurrentIndex;
63 
64  public:
65  ClassDef(RhoCandListIterator, 1) // Iterator for RhoCandList
66 };
67 
68 #endif
RhoCandListIterator(RhoCandList &)
RhoCandidate * Current()
RhoCandidate * Next()
RhoCandidate * Previous()