BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcRecoUtil/include/MdcRecoUtil/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#include "MdcRecoUtil/AIteratorBase.h"
24#include "MdcRecoUtil/CList.h"
25
26#ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
27# define inline
28#endif
29
30using namespace CLHEP;
31
32template <class T> class HepCListIterator : public HepAListIteratorBase {
33
34public:
35 inline HepCListIterator( const HepCList<T>& );
36 inline HepCListIterator( const HepAList<T>& );
37 // Constructor taking a corresponding list as argument. Starting at the
38 // first element.
39
41 // Copy constructor.
42
44
45 inline T* operator()();
46 inline T* next();
47 // Returns a pointer to the current object in the associated list, moving
48 // forward to the next. Returns 0 if all objects are done.
49
50 inline T* prev();
51 // Moves backward one step in the list and returns the object found there.
52 // If current object is the first in the list, no stepping is done and 0 is
53 // returned.
54
55 inline T* current() const;
56 // Returns a pointer to the current object in the associated list,
57 // without incrementing the index.
58};
59
60#ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
61# undef inline
62#endif
63
64#ifdef HEP_SHORT_NAMES
65# define CIterator HepCListIterator
66#endif
67
68#include "MdcRecoUtil/CIterator.icc"
69
70#endif
T * current() const
HepCListIterator(const HepAList< T > &)
HepCListIterator(const HepCListIterator< T > &)
HepCListIterator(const HepCList< T > &)