33 class TExMap :
public TObject {
35 friend class TExMapIter;
44 void SetHash(ULong64_t h) { fHash = (h | 1); }
45 ULong64_t GetHash()
const {
return fHash; }
46 Bool_t InUse()
const {
return fHash & 1; }
47 void Clear() { fHash = 0x0; }
54 Bool_t HighWaterMark() {
return (Bool_t) (fTally >= ((3*fSize)/4)); }
55 Int_t FindElement(ULong64_t hash, Long64_t key);
56 void FixCollisions(Int_t index);
60 TExMap(Int_t mapSize = 100);
61 TExMap(
const TExMap &map);
62 TExMap& operator=(
const TExMap&);
65 void Add(ULong64_t hash, Long64_t key, Long64_t value);
66 void Add(Long64_t key, Long64_t value) { Add(key, key, value); }
67 void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t value);
68 void Delete(Option_t *opt =
"");
69 Int_t Capacity()
const {
return fSize; }
70 void Expand(Int_t newsize);
71 Int_t GetSize()
const {
return fTally; }
72 Long64_t GetValue(ULong64_t hash, Long64_t key);
73 Long64_t GetValue(Long64_t key) {
return GetValue(key, key); }
74 Long64_t GetValue(ULong64_t hash, Long64_t key, UInt_t &slot);
75 void Remove(ULong64_t hash, Long64_t key);
76 void Remove(Long64_t key) { Remove(key, key); }
78 Long64_t &operator()(ULong64_t hash, Long64_t key);
79 Long64_t &operator()(Long64_t key) {
return operator()(key, key); }
92 TExMapIter(
const TExMap *map);
93 TExMapIter(
const TExMapIter& tei) : fMap(tei.fMap), fCursor(tei.fCursor) { }
94 TExMapIter& operator=(
const TExMapIter&);
95 virtual ~TExMapIter() { }
97 const TExMap *GetCollection()
const {
return fMap; }
98 Bool_t Next(ULong64_t &hash, Long64_t &key, Long64_t &value);
99 Bool_t Next(Long64_t &key, Long64_t &value);
100 void Reset() { fCursor = 0; }
102 ClassDef(TExMapIter,0)