15 #ifndef _UtlHashMap_h_ 16 #define _UtlHashMap_h_ 25 #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) 26 #define NUM_HASHMAP_BUCKETS(bits) (1ull<<bits) 28 #define NUM_HASHMAP_BUCKETS(bits) (1<<bits) 238 size_t bucketNumber(
unsigned hash)
const;
248 void notifyIteratorsOfRemove(
const UtlPair* pair);
263 #endif // _UtlHashMap_h_ UtlContainable * insert(UtlContainable *obj)
Inserts the designated containable object into the list with a NULL value.
Definition: UtlHashMap.cpp:241
virtual UtlContainableType getContainableType() const
Get the ContainableType for the hash bag as a contained object.
Definition: UtlHashMap.cpp:419
size_t numberOfBuckets() const
The current number of buckets in the hash.
Definition: UtlHashMap.h:181
void copyInto(UtlHashMap &map) const
Make a copy of all of the items BY POINTER in (*this) instance into the given map.
Definition: UtlHashMap.cpp:314
static const UtlContainable * INTERNAL_NULL
Definition: UtlHashMap.h:191
bool isUnLinked() const
Is this block not linked to anything?
Definition: UtlLink.h:93
OsStatus
Definition: OsStatus.h:27
Definition: UtlHashMapIterator.h:38
virtual UtlHashMap * clone() const
Make an off the heap copy of this object.
Definition: UtlHashMap.cpp:135
UtlChain mIteratorList
Definition: UtlContainer.h:202
virtual void destroyAll()
Removes all elements from the hash map and deletes each element.
Definition: UtlHashMap.cpp:211
const char *const UtlContainableType
Definition: UtlDefs.h:70
Definition: UtlContainable.h:37
virtual void removeAll()
Removes all elements from the hash map without deleting the elements.
Definition: UtlHashMap.cpp:187
size_t mBucketBits
number of bits used to index the buckets
Definition: UtlHashMap.h:203
virtual UtlContainable * find(const UtlContainable *key) const
Return the designated key if found otherwise NULL.
Definition: UtlHashMap.cpp:376
virtual unsigned hash() const
Definition: UtlContainer.cpp:87
virtual ~UtlHashMap()
Destructor.
Definition: UtlHashMap.cpp:53
UtlContainable * findValue(const UtlContainable *key) const
Return the value for a given key or NULL if not found.
Definition: UtlHashMap.cpp:358
virtual UtlBoolean destroy(UtlContainable *key)
Removes the designated key and its associated value from the map and frees the key and the value (if ...
Definition: UtlHashMap.cpp:164
UtlBoolean isEmpty() const
Return true if the hash map is empty (entries() == 0), otherwise false.
Definition: UtlHashMap.cpp:404
UtlHashMap()
Default Constructor.
Definition: UtlHashMap.cpp:44
Definition: UtlHashMap.h:46
Associate a key object (the parent UtlLink data) with its value object.
Definition: UtlLink.h:457
UtlContainable * key() const
Definition: UtlHashMapIterator.cpp:130
size_t mElements
number of UtlContainable objects in this UtlHashMap
Definition: UtlHashMap.h:202
int UtlBoolean
Definition: UtlDefs.h:41
UtlContainable * removeReference(const UtlContainable *key)
Remove the designated key and its associated value.
Definition: UtlHashMap.cpp:153
UtlBoolean contains(const UtlContainable *key) const
Return true if the hash map includes an entry with the specified key.
Definition: UtlHashMap.cpp:410
Definition: UtlContainer.h:38
UtlContainable * removeKeyAndValue(const UtlContainable *key, UtlContainable *&value)
Remove the designated key and its associated value.
Definition: UtlHashMap.cpp:282
#define NUM_HASHMAP_BUCKETS(bits)
Definition: UtlHashMap.h:28
UtlContainable * insertKeyAndValue(UtlContainable *key, UtlContainable *value)
Inserts a key and value pair into the hash map.
Definition: UtlHashMap.cpp:248
OsStatus deepCopyInto(UtlHashMap &map) const
Definition: UtlHashMap.cpp:323
void resizeIfNeededAndSafe()
If the Hash is too full, add additional buckets.
Definition: UtlHashMap.h:251
static const UtlContainableType TYPE
Definition: UtlHashMap.h:50
size_t entries() const
Return the total number of keys in the hash map.
Definition: UtlHashMap.cpp:396
UtlChain * mpBucket
an array of 2**n UtlChain elements, each used as a list header.
Definition: UtlHashMap.h:204