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