AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpExMapIterator.h
Go to the documentation of this file.
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 
13 // Author Laurent Aphecetche
14 
15 #ifndef ROOT_TIterator
16 # include "TIterator.h"
17 #endif
18 
19 class AliMpExMap;
20 class TString;
21 class TExMapIter;
22 
23 //_____________________________________________________________________________
24 class AliMpExMapIterator : public TIterator
25 {
26  friend class AliMpExMap;
27 
28 public:
29  AliMpExMapIterator(const AliMpExMap& theMap);
32  AliMpExMapIterator& operator=(const TIterator& rhs);
33 
34  virtual ~AliMpExMapIterator();
35 
37 
38  // Iterating without retrieving a key
39  virtual TObject* Next();
40 
41  // Iterating with retrieving a key
42  TObject* Next(Int_t& key);
43  TObject* Next(Int_t& keyFirst, Int_t& keySecond);
44  TObject* Next(TString& key);
45 
46  virtual void Reset();
47 
48  virtual const TCollection* GetCollection() const;
49 
50 private:
51 #if (defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE >= 334082) || \
52  (defined(ROOT_SVN_REVISION) && ROOT_SVN_REVISION >= 29598)
53  // ROOT_VERSION_CODE = 334082 corresponds to Root version 5.25/02
54  // ROOT_SVN_REVISION is not defined in Root versions after moving in git
55  typedef Long64_t Index_t;
56 #else
57  typedef Long_t Index_t;
58 #endif
59  Bool_t Next(Index_t& index, TObject*& object);
60 
61  TExMapIter* fIterator;
62 
63  ClassDef(AliMpExMapIterator,0) // TIterator for AliMpExMap
64 };
65 
66 
67 #endif
AliMpExMapIterator & operator=(const AliMpExMapIterator &rhs)
TExMapIter * fIterator
iterator we are wrapping
virtual TObject * Next()
The returned object must not be deleted by the user.
virtual const TCollection * GetCollection() const
AliMpExMapIterator(const AliMpExMap &theMap)
Implementation of TIterator for AliMpExMap.
Helper class making Root persistent TExMap.
Definition: AliMpExMap.h:28