Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:11

0001 // @(#)root/cont:$Id$
0002 // Author: Fons Rademakers   13/08/95
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TIterator
0013 #define ROOT_TIterator
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TIterator                                                            //
0019 //                                                                      //
0020 // Iterator abstract base class. This base class provides the interface //
0021 // for collection iterators.                                            //
0022 //                                                                      //
0023 //////////////////////////////////////////////////////////////////////////
0024 
0025 #include "Rtypes.h"
0026 
0027 class TCollection;
0028 class TObject;
0029 
0030 class TIterator {
0031 
0032 protected:
0033    TIterator() { }
0034    TIterator(const TIterator &) { }
0035 
0036 public:
0037    virtual TIterator &operator=(const TIterator &) = 0;
0038    virtual ~TIterator() { }
0039    virtual const TCollection *GetCollection() const = 0;
0040    virtual Option_t *GetOption() const { return ""; }
0041    virtual TObject  *Next() = 0;
0042    virtual void      Reset() = 0;
0043    TObject          *operator()() { return Next(); }
0044    virtual Bool_t    operator!=(const TIterator &) const;
0045    Bool_t            operator==(const TIterator & other) const { return !(*this != other); }
0046    virtual TObject  *operator*() const;
0047 
0048    ClassDef(TIterator,0)  //Iterator abstract base class
0049 };
0050 
0051 #endif