SourcePro® 2024.1 |
SourcePro® API Reference Guide |
A hash table for key-value pairs. Items are found by requiring them to be identical. More...
#include <rw/idendict.h>
Additional Inherited Members | |
Static Public Member Functions inherited from RWCollectable | |
static RWClassID | classID (const RWStringID &name) |
static RWClassID | classIsA () |
static bool | isAtom (RWClassID id) |
static RWspace | nilStoreSize () |
Static Public Attributes inherited from RWCollection | |
static size_t | DEFAULT_CAPACITY |
Related Symbols inherited from RWCollection | |
typedef void(* | RWapplyCollectable) (RWCollectable *, void *) |
typedef bool(* | RWtestCollectable) (const RWCollectable *, const void *) |
typedef bool(* | RWtestCollectablePair) (const RWCollectable *, const RWCollectable *, const void *) |
The class RWIdentityDictionary is implemented as a hash table, for the storage and retrieval of key-value pairs. Class RWIdentityDictionary is similar to class RWHashDictionary except that items are found by requiring that they be identical (i.e., have the same address) as the key, rather than being equal (i.e., test true
for isEqual()).
Both keys and values must inherit from the abstract base class RWCollectable.
The iterator for this class is RWHashDictionaryIterator.
RWIdentityDictionary::RWIdentityDictionary | ( | ) |
Constructs an empty identity dictionary with RWCollection::DEFAULT_CAPACITY hashing buckets.
RWIdentityDictionary::RWIdentityDictionary | ( | size_t | n | ) |
Constructs an empty identity dictionary with n hashing buckets.
RWIdentityDictionary::RWIdentityDictionary | ( | const RWIdentityDictionary & | h | ) |
Copy constructor. Makes a shallow copy of h.
|
inline |
Move constructor. The constructed RWIdentityDictionary takes ownership of the data owned by h.
|
virtual |
Returns a new, copy-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWHashDictionary.
|
virtual |
Returns __RWIDENTITYDICTIONARY
.
Reimplemented from RWHashDictionary.
|
virtual |
Behaves as if compareTo(t) was invoked, returning true
if the result equals 0, false
otherwise.
Reimplemented from RWHashDictionary.
|
virtual |
Returns a new, default-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWHashDictionary.
|
inline |
Returns true
if self is a subset of h, that is, every element of self has a counterpart in h which isEqual().
RWIdentityDictionary & RWIdentityDictionary::operator= | ( | const RWIdentityDictionary & | h | ) |
Assignment operator. Makes a shallow copy of the collection h.
|
inline |
Move assignment. Self takes ownership of the data owned by h.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |