Represents a collection of key/value pairs. More...
Represents a collection of key/value pairs.
Public Member Functions | |
ValuePtr | get (const KeyPtr &key) const |
Gets the element with the specified key. More... | |
bool | tryGet (const KeyPtr &key, ValuePtr &value) const |
Gets the element with the specified key. More... | |
void | set (const KeyPtr &key, const ValuePtr &value) |
Sets the element with the specified key. More... | |
ValuePtr | remove (const KeyPtr &key) |
Removes the element with the specified key. More... | |
bool | tryRemove (const KeyPtr &key) |
Removes the element with the specified key. More... | |
void | deleteItem (const KeyPtr &key) |
Deletes the element with the specified key. More... | |
SizeT | getCount () const |
Gets the number of elements contained in the dictionary. More... | |
void | clear () |
Removes all elements from the list. | |
bool | hasKey (const KeyPtr &key) const |
Checks if the element with the specified key exists in the dictionary. More... | |
ListPtr< KeyT, KeyPtr > | getKeyList () const |
Gets the list of all keys in the dictionary. More... | |
ListPtr< ValueT, ValuePtr > | getValueList () const |
Gets the list of all elements in the dictionary. More... | |
IterablePtr< KeyT, KeyPtr > | getKeys () const |
Gets the iterable interface of the keys. More... | |
IterablePtr< ValueT, ValuePtr > | getValues () const |
Gets the iterable interface of the elements. More... | |
IntfID | getKeyInterfaceId () const |
Returns the interface id of the expected key type. More... | |
IntfID | getValueInterfaceId () const |
Returns the interface id of the expected value type. More... | |
IteratorType | begin () const |
Creates start iterator for the dictionary. | |
IteratorType | end () const |
Creates end iterator for the dictionary. | |
void deleteItem | ( | const KeyPtr & | key | ) |
Deletes the element with the specified key.
key | The key of the element to delete. |
ValuePtr get | ( | const KeyPtr & | key | ) | const |
Gets the element with the specified key.
key | The key of the element to get. |
Throws an exception if the key does not exist.
SizeT getCount |
Gets the number of elements contained in the dictionary.
IntfID getKeyInterfaceId |
Returns the interface id of the expected key type.
IUnknown
. ListPtr< KeyT, KeyPtr > getKeyList |
Gets the list of all keys in the dictionary.
The order of the keys is not defined.
IterablePtr< KeyT, KeyPtr > getKeys |
Gets the iterable interface of the keys.
The Iterable object enables iteration through the keys.
IntfID getValueInterfaceId |
Returns the interface id of the expected value type.
IUnknown
. ListPtr< ValueT, ValuePtr > getValueList |
Gets the list of all elements in the dictionary.
The order of the elements is not defined.
IterablePtr< ValueT, ValuePtr > getValues |
Gets the iterable interface of the elements.
The Iterable object enables iteration through the elements.
bool hasKey | ( | const KeyPtr & | key | ) | const |
Checks if the element with the specified key exists in the dictionary.
key | The key of the element to check. |
ValuePtr remove | ( | const KeyPtr & | key | ) |
Removes the element with the specified key.
key | The key of the element to remove. |
Throws an exception if the key does not exist.
void set | ( | const KeyPtr & | key, |
const ValuePtr & | value | ||
) |
Sets the element with the specified key.
key | The key of the element to set. |
value | The element with the specified key. |
bool tryGet | ( | const KeyPtr & | key, |
ValuePtr & | value | ||
) | const |
Gets the element with the specified key.
key | The key of the element to get. | |
[out] | value | The element with the specified key. |
bool tryRemove | ( | const KeyPtr & | key | ) |
Removes the element with the specified key.
key | The key of the element to remove. |