/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/MdcRecoUtil/MdcRecoUtil-00-01-08/MdcRecoUtil/CIterator.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // CLASSDOC OFF
00003 // $Id: CIterator.h,v 1.2 2010/03/25 09:55:57 zhangy Exp $
00004 // CLASSDOC ON
00005 //
00006 // This file is a part of what might beome the CLHEP -
00007 // a Class Library for High Energy Physics.
00008 // 
00009 // This is the definition of the HepCListIterator class. It is used
00010 // in the same way as the HepConstAListIterator class but can also be used
00011 // with HepCList.
00012 //
00013 // .SS
00014 // AList.h, CList.h, ConstAList.h, AIterator.h, ConstAIterator.h,
00015 // AListBase.h, AIteratorBase.h
00016 //
00017 // Author: Leif Lonnblad
00018 //
00019 
00020 #ifndef _CITERATOR_H_
00021 #define _CITERATOR_H_
00022 
00023 
00024 #include "MdcRecoUtil/AIteratorBase.h"
00025 #include "MdcRecoUtil/CList.h"
00026 
00027 #ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
00028 #define inline
00029 #endif
00030 
00031 using namespace CLHEP;
00032 
00033 template <class T>
00034 class HepCListIterator : public HepAListIteratorBase {
00035 
00036 public:
00037 
00038   inline HepCListIterator(const HepCList<T> &);
00039   inline HepCListIterator(const HepAList<T> &);
00040   // Constructor taking a corresponding list as argument. Starting at the 
00041   // first element.
00042 
00043   inline HepCListIterator(const HepCListIterator<T> &);
00044   // Copy constructor.
00045 
00046   inline ~HepCListIterator();
00047 
00048   inline T * operator () ();
00049   inline T * next();
00050   // Returns a pointer to the current object in the associated list, moving
00051   // forward to the next. Returns 0 if all objects are done.
00052 
00053   inline T * prev();
00054   // Moves backward one step in the list and returns the object found there.
00055   // If current object is the first in the list, no stepping is done and 0 is
00056   // returned.
00057 
00058   inline T * current() const;
00059   // Returns a pointer to the current object in the associated list,
00060   // without incrementing the index.
00061   
00062 };
00063 
00064 #ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
00065 #undef inline
00066 #endif
00067 
00068 #ifdef HEP_SHORT_NAMES
00069 #define CIterator HepCListIterator
00070 #endif
00071 
00072 #include "MdcRecoUtil/CIterator.icc"
00073 
00074 #endif

Generated on Tue Nov 29 23:13:31 2016 for BOSS_7.0.2 by  doxygen 1.4.7