18 #include "LongLongCounter.h" 20 LongCounter::LongCounter() :
LongHash<int>()
22 SetAllowDuplicateKeys(
false);
25 void LongCounter::IncrementCount(
long long key)
27 unsigned int slot = Find(key);
29 if (slot == LH_NOTFOUND)
31 else if (Object(slot) == -1)
37 void LongCounter::DecrementCount(
long long key)
39 unsigned int slot = Find(key);
41 if (slot == LH_NOTFOUND)
43 else if (Object(slot) == 1)
49 int LongCounter::GetCount(
long long key)
51 unsigned int slot = Find(key);
53 if (slot == LH_NOTFOUND)
56 return Object(slot)--;