Logo ROOT   6.08/07
Reference Guide
TMap.cxx
Go to the documentation of this file.
1 // @(#)root/cont:$Id$
2 // Author: Fons Rademakers 12/11/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /** \class TMap
13 \ingroup Containers
14 TMap implements an associative array of (key,value) pairs using a
15 THashTable for efficient retrieval (therefore TMap does not conserve
16 the order of the entries). The hash value is calculated
17 using the value returned by the keys Hash() function and the
18 key comparison is done via the IsEqual() function.
19 Both key and value must inherit from TObject.
20 */
21 
22 #include "TMap.h"
23 #include "THashTable.h"
24 #include "TROOT.h"
25 #include "TBrowser.h"
26 #include "TRegexp.h"
27 
29 
30 ////////////////////////////////////////////////////////////////////////////////
31 /// TMap ctor. See THashTable for a description of the arguments.
32 
33 TMap::TMap(Int_t capacity, Int_t rehashlevel)
34 {
35  fSize = 0;
36  fTable = new THashTable(capacity, rehashlevel);
37 }
38 
39 ////////////////////////////////////////////////////////////////////////////////
40 /// TMap dtor. Objects are not deleted unless the TMap is the
41 /// owner (set via SetOwner()).
42 
44 {
45  Clear();
46  delete fTable;
47 }
48 
49 ////////////////////////////////////////////////////////////////////////////////
50 /// This function may not be used (but we need to provide it since it is
51 /// a pure virtual in TCollection). Use Add(key,value) instead.
52 
54 {
55  MayNotUse("Add(TObject *obj)");
56 }
57 
58 ////////////////////////////////////////////////////////////////////////////////
59 /// Add a (key,value) pair to the map.
60 
61 void TMap::Add(TObject *key, TObject *value)
62 {
63  if (IsArgNull("Add", key)) return;
64 
65  fTable->Add(new TPair(key, value));
66  fSize++;
67 }
68 
69 ////////////////////////////////////////////////////////////////////////////////
70 /// Return the ratio of entries vs occupied slots.
71 
73 {
74  return fTable->AverageCollisions();
75 }
76 
77 ////////////////////////////////////////////////////////////////////////////////
78 /// Return number of slots in the hashtable. Use GetSize() to get the
79 /// number of objects stored in the TMap.
80 
82 {
83  return fTable->Capacity();
84 }
85 
86 ////////////////////////////////////////////////////////////////////////////////
87 /// Remove all (key,value) pairs from the map. The keys/values are
88 /// deleted depending on the state of key-ownership (SetOwner()) and
89 /// value-ownership (SetOwnerValue()).
90 ///
91 /// To delete these objects regardless of the ownership state use:
92 /// - Delete() to delete only keys;
93 /// - DeleteValues() to delete only values;
94 /// - DeleteAll() to delete both keys and values.
95 
96 void TMap::Clear(Option_t *option)
97 {
98  if (IsOwner() && IsOwnerValue())
99  DeleteAll();
100  else if (IsOwner())
101  Delete();
102  else if (IsOwnerValue())
103  DeleteValues();
104  else {
105  fTable->Delete(option); // delete the TPair's
106  fSize = 0;
107  }
108 }
109 
110 ////////////////////////////////////////////////////////////////////////////////
111 /// Returns the number of collisions for a key with a certain name
112 /// (i.e. number of objects in same slot in the hash table, i.e. length
113 /// of linked list).
114 
115 Int_t TMap::Collisions(const char *keyname) const
116 {
117  return fTable->Collisions(keyname);
118 }
119 
120 ////////////////////////////////////////////////////////////////////////////////
121 /// Returns the number of collisions for a key (i.e. number of objects
122 /// in same slot in the hash table, i.e. length of linked list).
123 
125 {
126  return fTable->Collisions(key);
127 }
128 
129 ////////////////////////////////////////////////////////////////////////////////
130 /// Remove all (key,value) pairs from the map AND delete the keys
131 /// when they are allocated on the heap.
132 
133 void TMap::Delete(Option_t *option)
134 {
135  TIter next(fTable);
136  TPair *a;
137 
138  while ((a = (TPair *)next()))
139  if (a->Key() && a->Key()->IsOnHeap())
141 
142  fTable->Delete(option); // delete the TPair's
143  fSize = 0;
144 }
145 
146 ////////////////////////////////////////////////////////////////////////////////
147 /// Remove all (key,value) pairs from the map AND delete the values
148 /// when they are allocated on the heap.
149 
151 {
152  TIter next(fTable);
153  TPair *a;
154 
155  while ((a = (TPair *)next()))
156  if (a->Value() && a->Value()->IsOnHeap())
158 
159  fTable->Delete(); // delete the TPair's
160  fSize = 0;
161 }
162 
163 ////////////////////////////////////////////////////////////////////////////////
164 /// Remove all (key,value) pairs from the map AND delete the keys AND
165 /// values when they are allocated on the heap.
166 
168 {
169  TIter next(fTable);
170  TPair *a;
171 
172  while ((a = (TPair *)next())) {
173  if (a->Key() && a->Key()->IsOnHeap())
175  if (a->Value() && a->Value()->IsOnHeap())
177  }
178 
179  fTable->Delete(); // delete the TPair's
180  fSize = 0;
181 }
182 
183 ////////////////////////////////////////////////////////////////////////////////
184 /// Remove (key,value) pair with key from the map. Returns true
185 /// if the key was found and removed, false otherwise.
186 /// The key and value objects are deleted if map is the owner
187 /// of keys and values respectively.
188 
190 {
191  if (!key) return kFALSE;
192 
193  TPair *a;
194  if ((a = (TPair *)fTable->FindObject(key))) {
195  if (fTable->Remove(key)) {
196  if (IsOwner() && a->Key() && a->Key()->IsOnHeap())
198  if (IsOwnerValue() && a->Value() && a->Value()->IsOnHeap())
200  delete a;
201  fSize--;
202  return kTRUE;
203  }
204  }
205  return kFALSE;
206 }
207 
208 ////////////////////////////////////////////////////////////////////////////////
209 /// Check if a (key,value) pair exists with keyname as name of the key.
210 /// Returns a TPair* (need to downcast from TObject). Use Key() and
211 /// Value() to get the pointers to the key and value, respectively.
212 /// Returns 0 if not found.
213 
214 TObject *TMap::FindObject(const char *keyname) const
215 {
216  return fTable->FindObject(keyname);
217 }
218 
219 ////////////////////////////////////////////////////////////////////////////////
220 /// Check if a (key,value) pair exists with key as key.
221 /// Returns a TPair* (need to downcast from TObject). Use Key() and
222 /// Value() to get the pointers to the key and value, respectively.
223 /// Returns 0 if not found.
224 
225 TObject *TMap::FindObject(const TObject *key) const
226 {
227  if (IsArgNull("FindObject", key)) return 0;
228 
229  return fTable->FindObject(key);
230 }
231 
232 ////////////////////////////////////////////////////////////////////////////////
233 /// Returns a pointer to the value associated with keyname as name of the key.
234 
235 TObject *TMap::GetValue(const char *keyname) const
236 {
237  TPair *a = (TPair *)fTable->FindObject(keyname);
238  if (a) return a->Value();
239  return 0;
240 }
241 
242 ////////////////////////////////////////////////////////////////////////////////
243 /// Returns a pointer to the value associated with key.
244 
245 TObject *TMap::GetValue(const TObject *key) const
246 {
247  if (IsArgNull("GetValue", key)) return 0;
248 
249  TPair *a = (TPair *)fTable->FindObject(key);
250  if (a) return a->Value();
251  return 0;
252 }
253 
254 ////////////////////////////////////////////////////////////////////////////////
255 /// Create an iterator for TMap.
256 
258 {
259  return new TMapIter(this, dir);
260 }
261 
262 ////////////////////////////////////////////////////////////////////////////////
263 /// Print the collection entry.
264 
265 void TMap::PrintCollectionEntry(TObject* entry, Option_t* option, Int_t recurse) const
266 {
267  TObject* val = GetValue(entry);
268 
270  printf("Key: ");
271  entry->Print();
273  printf("Value: ");
274  TCollection* coll = dynamic_cast<TCollection*>(val);
275  if (coll) {
276  coll->Print(option, recurse);
277  } else {
278  val->Print(option);
279  }
280 }
281 
282 ////////////////////////////////////////////////////////////////////////////////
283 /// Rehash the underlaying THashTable (see THashTable::Rehash()).
284 
285 void TMap::Rehash(Int_t newCapacity, Bool_t checkObjValidity)
286 {
287  fTable->Rehash(newCapacity, checkObjValidity);
288 }
289 
290 ////////////////////////////////////////////////////////////////////////////////
291 /// Remove the (key,value) pair with key from the map. Returns the
292 /// key object or 0 in case key was not found. If map is the owner
293 /// of values, the value is deleted.
294 
296 {
297  if (!key) return 0;
298 
299  TPair *a;
300  if ((a = (TPair *)fTable->FindObject(key))) {
301  if (fTable->Remove(key)) {
302  if (IsOwnerValue() && a->Value() && a->Value()->IsOnHeap())
304  TObject *kobj = a->Key();
305  delete a;
306  fSize--;
307  return kobj;
308  }
309  }
310  return 0;
311 }
312 
313 ////////////////////////////////////////////////////////////////////////////////
314 /// Remove (key,value) pair with key from the map. Returns the
315 /// pair object or 0 in case the key was not found.
316 /// It is caller's responsibility to delete the pair and, eventually,
317 /// the key and value objects.
318 
320 {
321  if (!key) return 0;
322 
323  TPair *a;
324  if ((a = (TPair *)fTable->FindObject(key))) {
325  if (fTable->Remove(key)) {
326  fSize--;
327  return a;
328  }
329  }
330  return 0;
331 }
332 
333 ////////////////////////////////////////////////////////////////////////////////
334 /// Set whether this map is the owner (enable==true)
335 /// of its values. If it is the owner of its contents,
336 /// these objects will be deleted whenever the collection itself
337 /// is deleted. The objects might also be deleted or destructed when Clear
338 /// is called (depending on the collection).
339 
341 {
342  if (enable)
344  else
346 }
347 
348 ////////////////////////////////////////////////////////////////////////////////
349 /// Set ownership for keys and values.
350 
351 void TMap::SetOwnerKeyValue(Bool_t ownkeys, Bool_t ownvals)
352 {
353  SetOwner(ownkeys);
354  SetOwnerValue(ownvals);
355 }
356 
357 ////////////////////////////////////////////////////////////////////////////////
358 /// Stream all key/value pairs in the map to or from the I/O buffer.
359 
360 void TMap::Streamer(TBuffer &b)
361 {
362  TObject *obj=0;
363  UInt_t R__s, R__c;
364 
365  if (b.IsReading()) {
366  Int_t nobjects;
367  TObject *value=0;
368 
369  Version_t v = b.ReadVersion(&R__s, &R__c);
370  if (v > 2)
371  TObject::Streamer(b);
372  if (v > 1)
373  fName.Streamer(b);
374  b >> nobjects;
375  for (Int_t i = 0; i < nobjects; i++) {
376  b >> obj;
377  b >> value;
378  if (obj) Add(obj, value);
379  }
380  b.CheckByteCount(R__s, R__c,TMap::IsA());
381  } else {
382  R__c = b.WriteVersion(TMap::IsA(), kTRUE);
383  TObject::Streamer(b);
384  fName.Streamer(b);
385  b << GetSize();
386  TIter next(fTable);
387  TPair *a;
388  while ((a = (TPair*) next())) {
389  b << a->Key();
390  b << a->Value();
391  }
392  b.SetByteCount(R__c, kTRUE);
393  }
394 }
395 
396 ////////////////////////////////////////////////////////////////////////////////
397 /// Write all objects in this map. By default all objects in
398 /// the collection are written individually (each object gets its
399 /// own key). Note, this is recursive, i.e. objects in collections
400 /// in the collection are also written individually. To write all
401 /// objects using a single key specify a name and set option to
402 /// TObject::kSingleKey (i.e. 1).
403 
404 Int_t TMap::Write(const char *name, Int_t option, Int_t bsize) const
405 {
406  if ((option & kSingleKey)) {
407  return TObject::Write(name, option, bsize);
408  } else {
409  option &= ~kSingleKey;
410  Int_t nbytes = 0;
411  TIter next(fTable);
412  TPair *a;
413  while ((a = (TPair*) next())) {
414  if (a->Key())
415  nbytes += a->Key()->Write(name, option, bsize);
416  if (a->Value())
417  nbytes += a->Value()->Write(name, option, bsize);
418  }
419  return nbytes;
420  }
421 }
422 
423 ////////////////////////////////////////////////////////////////////////////////
424 /// Write all objects in this map. By default all objects in
425 /// the collection are written individually (each object gets its
426 /// own key). Note, this is recursive, i.e. objects in collections
427 /// in the collection are also written individually. To write all
428 /// objects using a single key specify a name and set option to
429 /// TObject::kSingleKey (i.e. 1).
430 
431 Int_t TMap::Write(const char *name, Int_t option, Int_t bsize)
432 {
433  return ((const TMap*)this)->Write(name,option,bsize);
434 }
435 
436 /** \class TPair
437 Class used by TMap to store (key,value) pairs.
438 */
439 
440 ////////////////////////////////////////////////////////////////////////////////
441 /// Browse the pair.
442 
444 {
445  if (b) {
446  if (fKey) b->Add(fKey);
447  if (fValue) b->Add(fValue);
448  } else {
449  if (fKey) fKey->Browse(b);
450  if (fValue) fValue->Browse(b);
451  }
452 }
453 
454 /** \class TMapIter
455 Iterator of map.
456 */
457 
459 
460 ////////////////////////////////////////////////////////////////////////////////
461 /// Create a map iterator. Use dir to specify the desired iteration direction.
462 
464 {
465  fMap = m;
466  fDirection = dir;
467  fCursor = 0;
468 }
469 
470 ////////////////////////////////////////////////////////////////////////////////
471 /// Copy ctor.
472 
474 {
475  fMap = iter.fMap;
476  fDirection = iter.fDirection;
477  fCursor = 0;
478  if (iter.fCursor) {
480  if (fCursor)
481  fCursor->operator=(*iter.fCursor);
482  }
483 }
484 
485 ////////////////////////////////////////////////////////////////////////////////
486 /// Overridden assignment operator.
487 
489 {
490  if (this != &rhs && rhs.IsA() == TMapIter::Class()) {
491  const TMapIter &rhs1 = (const TMapIter &)rhs;
492  fMap = rhs1.fMap;
493  fDirection = rhs1.fDirection;
494  if (rhs1.fCursor) {
496  if (fCursor)
497  fCursor->operator=(*rhs1.fCursor);
498  }
499  }
500  return *this;
501 }
502 
503 ////////////////////////////////////////////////////////////////////////////////
504 /// Overloaded assignment operator.
505 
507 {
508  if (this != &rhs) {
509  fMap = rhs.fMap;
510  fDirection = rhs.fDirection;
511  if (rhs.fCursor) {
513  if (fCursor)
514  fCursor->operator=(*rhs.fCursor);
515  }
516  }
517  return *this;
518 }
519 
520 ////////////////////////////////////////////////////////////////////////////////
521 /// Map iterator dtor.
522 
524 {
525  Reset();
526 }
527 
528 ////////////////////////////////////////////////////////////////////////////////
529 /// Returns the next key from a map. Use TMap::GetValue() to get the value
530 /// associated with the key. Returns 0 when no more items in map.
531 
533 {
534  if (!fCursor)
536 
537  TPair *a = (TPair *)fCursor->Next();
538  if (a) return a->Key();
539  return 0;
540 }
541 
542 ////////////////////////////////////////////////////////////////////////////////
543 /// Reset the map iterator.
544 
546 {
548 }
549 
550 ////////////////////////////////////////////////////////////////////////////////
551 /// This operator compares two TIterator objects.
552 
554 {
555  if (aIter.IsA() == TMapIter::Class()) {
556  const TMapIter &iter(dynamic_cast<const TMapIter &>(aIter));
557  return (fCursor->operator*() != iter.fCursor->operator*());
558  }
559  return false; // for base class we don't implement a comparison
560 }
561 
562 ////////////////////////////////////////////////////////////////////////////////
563 /// This operator compares two TMapIter objects.
564 
566 {
567  return (fCursor->operator*() != aIter.fCursor->operator*());
568 }
569 
570 ////////////////////////////////////////////////////////////////////////////////
571 /// Return pointer to current object (a TPair) or nullptr.
572 
574 {
575  return (fCursor ? fCursor->operator*() : nullptr);
576 }
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
Definition: TBrowser.cxx:261
Int_t Capacity() const
Return number of slots in the hashtable.
Definition: TMap.cxx:81
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TObject.cxx:830
Bool_t IsReading() const
Definition: TBuffer.h:83
TPair * RemoveEntry(TObject *key)
Remove (key,value) pair with key from the map.
Definition: TMap.cxx:319
short Version_t
Definition: RtypesCore.h:61
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
Bool_t IsArgNull(const char *where, const TObject *obj) const
Returns true if object is a null pointer.
TMapIter()
Definition: TMap.h:158
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
void Rehash(Int_t newCapacity, Bool_t checkObjValidity=kTRUE)
Rehash the hashtable.
Definition: THashTable.cxx:280
Float_t AverageCollisions() const
Definition: THashTable.h:83
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
Definition: TMap.cxx:53
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
const Bool_t kFALSE
Definition: Rtypes.h:92
TString fName
Definition: TCollection.h:62
THashTableIter * fCursor
Definition: TMap.h:155
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Definition: TObject.cxx:595
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this map.
Definition: TMap.cxx:431
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
const char * Class
Definition: TXMLSetup.cxx:64
virtual ~TMap()
TMap dtor.
Definition: TMap.cxx:43
Iterator abstract base class.
Definition: TIterator.h:32
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:739
TObject * operator*() const
Return pointer to current object (a TPair) or nullptr.
Definition: TMap.cxx:573
const TMap * fMap
Definition: TMap.h:154
#define SafeDelete(p)
Definition: RConfig.h:507
Iterator of hash table.
Definition: THashTable.h:106
THashTable implements a hash table to store TObject&#39;s.
Definition: THashTable.h:39
Bool_t fDirection
Definition: TMap.h:156
Int_t bsize[]
Definition: SparseFit4.cxx:31
Bool_t IsOwnerValue() const
Definition: TMap.h:82
void DeleteAll()
Remove all (key,value) pairs from the map AND delete the keys AND values when they are allocated on t...
Definition: TMap.cxx:167
Float_t AverageCollisions() const
Return the ratio of entries vs occupied slots.
Definition: TMap.cxx:72
void MayNotUse(const char *method) const
Use this method to signal that a method (defined in a base class) may not be called in a derived clas...
Definition: TObject.cxx:978
Bool_t IsOwner() const
Definition: TCollection.h:101
TObject * Value() const
Definition: TMap.h:125
friend class TMapIter
Definition: TMap.h:46
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Create an iterator for TMap.
Definition: TMap.cxx:257
Iterator of map.
Definition: TMap.h:148
virtual void SetOwnerValue(Bool_t enable=kTRUE)
Set whether this map is the owner (enable==true) of its values.
Definition: TMap.cxx:340
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
virtual void SetOwnerKeyValue(Bool_t ownkeys=kTRUE, Bool_t ownvals=kTRUE)
Set ownership for keys and values.
Definition: TMap.cxx:351
void Delete(Option_t *option="")
Remove all (key,value) pairs from the map AND delete the keys when they are allocated on the heap...
Definition: TMap.cxx:133
SVector< double, 2 > v
Definition: Dict.h:5
TObject * Remove(TObject *key)
Remove the (key,value) pair with key from the map.
Definition: TMap.cxx:295
TObject * Key() const
Definition: TMap.h:124
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const =0
PyObject * fValue
Bool_t DeleteEntry(TObject *key)
Remove (key,value) pair with key from the map.
Definition: TMap.cxx:189
Collection abstract base class.
Definition: TCollection.h:48
unsigned int UInt_t
Definition: RtypesCore.h:42
TMarker * m
Definition: textangle.C:8
~TMapIter()
Map iterator dtor.
Definition: TMap.cxx:523
Int_t fSize
Definition: TCollection.h:63
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition: TROOT.cxx:2618
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
write collection with single key
Definition: TObject.h:76
void DeleteValues()
Remove all (key,value) pairs from the map AND delete the values when they are allocated on the heap...
Definition: TMap.cxx:150
void Rehash(Int_t newCapacity, Bool_t checkObjValidity=kTRUE)
Rehash the underlaying THashTable (see THashTable::Rehash()).
Definition: TMap.cxx:285
static void GarbageCollect(TObject *obj)
Add to the list of things to be cleaned up.
Int_t Collisions(const char *name) const
Returns the number of collisions for an object with a certain name (i.e.
Definition: THashTable.cxx:171
Class used by TMap to store (key,value) pairs.
Definition: TMap.h:106
TObject * FindObject(const char *name) const
Find object using its name.
Definition: THashTable.cxx:210
Bool_t IsOnHeap() const
Definition: TObject.h:119
#define ClassImp(name)
Definition: Rtypes.h:279
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:44
const TCollection * GetCollection() const
Definition: THashTable.h:124
void Add(TObject *obj)
Add object to the hash table.
Definition: THashTable.cxx:76
THashTable * fTable
Definition: TMap.h:49
Int_t Collisions(const char *keyname) const
Returns the number of collisions for a key with a certain name (i.e.
Definition: TMap.cxx:115
TIterator & operator=(const TIterator &rhs)
Overridden assignment operator.
Definition: TMap.cxx:488
Mother of all ROOT objects.
Definition: TObject.h:37
void Delete(Option_t *option="")
Remove all objects from the table AND delete all heap based objects.
Definition: THashTable.cxx:194
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
Definition: TMap.cxx:214
Bool_t operator!=(const TIterator &aIter) const
This operator compares two TIterator objects.
Definition: TMap.cxx:553
TObject * Next()
Returns the next key from a map.
Definition: TMap.cxx:532
Int_t Capacity() const
Definition: TCollection.h:80
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
TObject * Next()
Return next object in hashtable. Returns 0 when no more objects in table.
Definition: THashTable.cxx:435
virtual void Browse(TBrowser *b)
Browse the pair.
Definition: TMap.cxx:443
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
Definition: TMap.cxx:235
void ResetBit(UInt_t f)
Definition: TObject.h:156
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
virtual Int_t GetSize() const
Definition: TCollection.h:95
const Bool_t kTRUE
Definition: Rtypes.h:91
void Reset()
Reset the map iterator.
Definition: TMap.cxx:545
virtual void PrintCollectionEntry(TObject *entry, Option_t *option, Int_t recurse) const
Print the collection entry.
Definition: TMap.cxx:265
char name[80]
Definition: TGX11.cxx:109
void Clear(Option_t *option="")
Remove all (key,value) pairs from the map.
Definition: TMap.cxx:96
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
TObject * Remove(TObject *obj)
Remove object from the hashtable.
Definition: THashTable.cxx:315