CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
CIterator.h
Go to the documentation of this file.
1// -*- C++ -*-
2// CLASSDOC OFF
3// $Id: CIterator.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 HepCListIterator class. It is used
10// in the same way as the HepConstAListIterator class but can also be used
11// with HepCList.
12//
13// .SS
14// AList.h, CList.h, ConstAList.h, AIterator.h, ConstAIterator.h,
15// AListBase.h, AIteratorBase.h
16//
17// Author: Leif Lonnblad
18//
19
20#ifndef _CITERATOR_H_
21#define _CITERATOR_H_
22
23
24#include "MdcRecoUtil/AIteratorBase.h"
25#include "MdcRecoUtil/CList.h"
26
27#ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
28#define inline
29#endif
30
31using namespace CLHEP;
32
33template <class T>
34class HepCListIterator : 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 T * operator () ();
49 inline 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 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 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 CIterator HepCListIterator
70#endif
71
72#include "MdcRecoUtil/CIterator.icc"
73
74#endif
T * current() const
HepCListIterator(const HepAList< T > &)
HepCListIterator(const HepCListIterator< T > &)
HepCListIterator(const HepCList< T > &)
Definition: CList.h:42