#ifndef ROOT_THashList #define ROOT_THashList //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // THashList // // // // THashList implements a hybrid collection class consisting of a // // hash table and a list to store TObject's. The hash table is used for // // quick access and lookup of objects while the list allows the objects // // to be ordered. The hash value is calculated using the value returned // // by the TObject's Hash() function. Each class inheriting from TObject // // can override Hash() as it sees fit. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TList //*KEEP,TList. #include "TList.h" //*KEND. #endif class THashTable; class THashList : public TList { protected: THashTable *fTable; //Hashtable used for quick lookup of objects public: THashList(Int_t capacity=TCollection::kInitHashTableCapacity, Int_t rehash=0); THashList(TObject *parent, Int_t capacity=TCollection::kInitHashTableCapacity, Int_t rehash=0); virtual ~THashList(); Float_t AverageCollisions() const; void Clear(Option_t *option=""); void Delete(Option_t *option=""); TObject *FindObject(const Text_t *name) const; TObject *FindObject(TObject *obj) const; void AddFirst(TObject *obj); void AddFirst(TObject *obj, Option_t *opt); void AddLast(TObject *obj); void AddLast(TObject *obj, Option_t *opt); void AddAt(TObject *obj, Int_t idx); void AddAfter(TObject *after, TObject *obj); void AddAfter(TObjLink *after, TObject *obj); void AddBefore(TObject *before, TObject *obj); void AddBefore(TObjLink *before, TObject *obj); void Rehash(Int_t newCapacity); TObject *Remove(TObject *obj); TObject *Remove(TObjLink *lnk); ClassDef(THashList,0) //Doubly linked list with hashtable for lookup }; #endif