AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpStringObjMap.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 
13 
14 #ifndef ALI_MP_STRING_OBJ_MAP_H
15 #define ALI_MP_STRING_OBJ_MAP_H
16 
17 #include <TObject.h>
18 #include <TObjArray.h>
19 #include <TArrayI.h>
20 
21 using std::ofstream;
22 
23 class AliMpStringObjMap : public TObject
24 {
25  public:
26  AliMpStringObjMap(Bool_t isOwner = false);
27  virtual ~AliMpStringObjMap();
28 
29  // methods
30  Bool_t Add(const TString& first, TObject* second);
31  TObject* Get(const TString& first) const;
32  Int_t GetNofItems() const;
33  virtual void Clear(Option_t* /*option*/ ="");
34  virtual void Print(const char* /*option*/ = "") const;
35  void Print(const TString& key, ofstream& out) const;
36 
37  // iterating over elements
38  void First();
39  void Next();
40  TObject* CurrentItem();
41  TString CurrentKey();
42  Bool_t IsDone() const;
43 
44  private:
49 
50  // static methods
51  static const TString& GetUndefinedKey();
52 
53  // data members
54  Int_t fNofItems;
57  Int_t fCurrentIndex;
58 
59  ClassDef(AliMpStringObjMap,1) // motif map
60 };
61 
62 #endif //ALI_MP_STRING_OBJ_MAP_H
AliMpStringObjMap(Bool_t isOwner=false)
TObjArray fFirstArray
first item array
static const TString & GetUndefinedKey()
#define TObjArray
Bool_t Add(const TString &first, TObject *second)
Int_t GetNofItems() const
AliMpStringObjMap & operator=(const AliMpStringObjMap &rhs)
Not implemented.
Int_t fCurrentIndex
current item index (for iteration)
Substitutes map <string, TObject> which ALICE does not allow to use.
Bool_t IsDone() const
Int_t fNofItems
number of items
TObject * Get(const TString &first) const
TObjArray fSecondArray
second item array
virtual void Clear(Option_t *="")
virtual void Print(const char *="") const