]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpExMapIterator.h
In mapping:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpExMapIterator.h
1 #ifndef ALIMPEXMAPITERATOR_H
2 #define ALIMPEXMAPITERATOR_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup core
10 /// \class AliMpExMapIterator
11 /// \brief Implementation of TIterator for AliMpExMap
12 /// 
13 //  Author Laurent Aphecetche
14
15 #ifndef ROOT_TIterator
16 #  include "TIterator.h"
17 #endif
18
19 class AliMpExMap;
20 class AliMpIntPair;
21 class TString;
22 class TExMapIter;
23
24 //_____________________________________________________________________________
25 class AliMpExMapIterator : public TIterator
26 {
27 public:
28   AliMpExMapIterator(const AliMpExMap& theMap);
29   AliMpExMapIterator(const AliMpExMapIterator& rhs);
30   AliMpExMapIterator& operator=(const AliMpExMapIterator& rhs);
31   AliMpExMapIterator& operator=(const TIterator& rhs);
32   
33   virtual ~AliMpExMapIterator();
34   
35   /// The returned object must not be deleted by the user.  
36
37   // Iterating without retrieving a key
38   virtual TObject* Next();
39
40   // Iterating with retrieving a key
41   TObject*  Next(Int_t& key);
42   TObject*  Next(AliMpIntPair& key);
43   TObject*  Next(TString& key);
44   
45   virtual void Reset(); 
46   
47   virtual const TCollection* GetCollection() const;
48
49 private:
50     
51     Bool_t Next(Long_t& index, TObject*& object);
52
53 private:
54   
55     TExMapIter* fIterator; ///< iterator we are wrapping
56
57   ClassDef(AliMpExMapIterator,0) // TIterator for AliMpExMap
58 };
59
60
61 #endif