12#ifndef ROOT_THashTable
13#define ROOT_THashTable
134 void Reset()
override;
#define ClassDefOverride(name, id)
const Bool_t kIterForward
Collection abstract base class.
void Print(Option_t *option="") const override
Default print for collections, calls Print(option, 1).
Bool_t operator!=(const TIterator &aIter) const override
This operator compares two TIterator objects.
const THashTable * fTable
~THashTableIter()
Delete hashtable iterator.
void Reset() override
Reset the hashtable iterator.
TObject * operator*() const override
Return pointer to current object or nullptr.
const TCollection * GetCollection() const override
TObject * Next() override
Return next object in hashtable. Returns 0 when no more objects in table.
TIterator & operator=(const TIterator &rhs) override
Overridden assignment operator.
Int_t NextSlot()
Returns index of next slot in table containing list to be iterated.
THashTable implements a hash table to store TObject's.
Float_t AverageCollisions() const
THashTable & operator=(const THashTable &)=delete
void Add(TObject *obj) override
Add object to the hash table.
const TList * GetListForObject(const char *name) const
Return the TList corresponding to object's name based hash value.
void AddImpl(Int_t slot, TObject *object)
Helper function doing the actual add to the table give a slot and object.
TObject * Remove(TObject *obj) override
Remove object from the hashtable.
void Rehash(Int_t newCapacity, Bool_t checkObjValidity=kTRUE)
Rehash the hashtable.
TObject * RemoveSlow(TObject *obj)
Remove object from the hashtable without using the hash value.
TIterator * MakeIterator(Bool_t dir=kIterForward) const override
Returns a hash table iterator.
TObject ** GetObjectRef(const TObject *obj) const override
Return address of pointer to obj.
THashTable(const THashTable &)=delete
void AddBefore(const TObject *before, TObject *obj)
Add object to the hash table.
void AddAll(const TCollection *col) override
Add all objects from collection col to this collection.
TObject * FindObject(const char *name) const override
Find object using its name.
Int_t GetSize() const override
Return the capacity of the collection, i.e.
Int_t GetRehashLevel() const
Int_t GetHashValue(TString &s) const
void Clear(Option_t *option="") override
Remove all objects from the table.
Int_t Collisions(const char *name) const
Returns the number of collisions for an object with a certain name (i.e.
void SetRehashLevel(Int_t rehash)
Int_t GetHashValue(const char *str) const
void Print(Option_t *option, Int_t recurse) const override
Print the collection header and its elements.
void Delete(Option_t *option="") override
Remove all objects from the table AND delete all heap based objects.
virtual ~THashTable()
Delete a hashtable.
Int_t GetCheckedHashValue(TObject *obj) const
Int_t GetHashValue(const TObject *obj) const
Iterator abstract base class.
Mother of all ROOT objects.
ULong_t CheckedHash()
Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return t...
virtual ULong_t Hash() const
Return hash value for this object.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.