TIterator.h

Go to the documentation of this file.
00001 // @(#)root/cont:$Id: TIterator.h 23212 2008-04-14 15:30:20Z rdm $
00002 // Author: Fons Rademakers   13/08/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TIterator
00013 #define ROOT_TIterator
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TIterator                                                            //
00019 //                                                                      //
00020 // Iterator abstract base class. This base class provides the interface //
00021 // for collection iterators.                                            //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_Rtypes
00026 #include "Rtypes.h"
00027 #endif
00028 
00029 class TCollection;
00030 class TObject;
00031 
00032 class TIterator {
00033 
00034 protected:
00035    TIterator() { }
00036    TIterator(const TIterator &) { }
00037 
00038 public:
00039    virtual TIterator &operator=(const TIterator &) { return *this; }
00040    virtual ~TIterator() { }
00041    virtual const TCollection *GetCollection() const = 0;
00042    virtual Option_t *GetOption() const { return ""; }
00043    virtual TObject  *Next() = 0;
00044    virtual void      Reset() = 0;
00045    TObject          *operator()() { return Next(); }
00046    virtual bool      operator!=(const TIterator &) const;
00047    virtual TObject  *operator*() const;
00048 
00049    ClassDef(TIterator,0)  //Iterator abstract base class
00050 };
00051 
00052 #endif

Generated on Tue Jul 5 14:11:27 2011 for ROOT_528-00b_version by  doxygen 1.5.1