#include <LibState.h>
Definition at line 137 of file LibState.h.
◆ PtrHashMap()
PtrHashMap::PtrHashMap |
( |
size_t | nBuckets | ) |
|
Definition at line 328 of file LibState.cpp.
329{
331
332 size_t nBytes =
sizeof(
NodeBase) * nBuckets;
334 for(size_t i = 0; i < nBuckets; i++) {
337 }
340}
DCLCAPI size_t DCLGetNextPrimNumber(size_t _n)
◆ ~PtrHashMap()
PtrHashMap::~PtrHashMap |
( |
| ) |
|
Definition at line 342 of file LibState.cpp.
343{
348 while(pNode != pMasterNode) {
349 pTempNode = pNode;
350 pNode = pNode->
pNext;
351 free(pTempNode);
352 }
353 }
355}
◆ bucketNumber()
size_t PtrHashMap::bucketNumber |
( |
const void * | key | ) |
const |
|
inlineprotected |
◆ count()
size_t PtrHashMap::count |
( |
| ) |
const |
|
inline |
◆ erase()
void PtrHashMap::erase |
( |
Node * | pNode | ) |
|
Definition at line 394 of file LibState.cpp.
395{
397
398 pNode->pPrev->pNext = pNode->pNext;
399 pNode->pNext->pPrev = pNode->pPrev;
400
401 free(pNode);
403}
#define __DCL_ASSERT_N(expr)
◆ find()
Definition at line 378 of file LibState.cpp.
379{
383
384 while(pNode != pMasterNode) {
385 if (((
Node*)pNode)->key == key)
387 pNode = pNode->pNext;
388
389
390 }
392}
size_t bucketNumber(const void *key) const
◆ operator[]()
const void *& PtrHashMap::operator[] |
( |
const void * | key | ) |
|
Definition at line 357 of file LibState.cpp.
358{
362 while(pNode != pMasterNode) {
363 if (((
Node*)pNode)->key == key)
364 return ((
Node*)pNode)->value;
365 pNode = pNode->pNext;
366 }
367
369 pNewNode->
pPrev = pMasterNode;
372 pMasterNode->
pNext = pNewNode;
374 pNewNode->key = key;
375 return pNewNode->value;
376}
◆ m_buckets
◆ m_nBuckets
size_t PtrHashMap::m_nBuckets |
|
protected |
◆ m_nCount
The documentation for this class was generated from the following files: