Definition at line 23 of file LongLongCounter.h.
◆ LongCounter()
LongCounter::LongCounter |
( |
| ) |
|
◆ DecrementCount()
void LongCounter::DecrementCount |
( |
long long |
key | ) |
|
Definition at line 37 of file LongLongCounter.cpp.
38{
39 unsigned int slot = Find(key);
40
41 if (slot == LH_NOTFOUND)
42 Add(key, -1);
43 else if (Object(slot) == 1)
44 Delete(slot);
45 else
46 Object(slot)--;
47}
◆ GetCount()
int LongCounter::GetCount |
( |
long long |
key | ) |
|
Definition at line 49 of file LongLongCounter.cpp.
50{
51 unsigned int slot = Find(key);
52
53 if (slot == LH_NOTFOUND)
54 return 0;
55 else
56 return Object(slot)--;
57}
◆ IncrementCount()
void LongCounter::IncrementCount |
( |
long long |
key | ) |
|
Definition at line 25 of file LongLongCounter.cpp.
26{
27 unsigned int slot = Find(key);
28
29 if (slot == LH_NOTFOUND)
30 Add(key, 1);
31 else if (Object(slot) == -1)
32 Delete(slot);
33 else
34 Object(slot)++;
35}
The documentation for this class was generated from the following files: