SEDict is a dictionary class of KeyType associated to ValueType. More...
#include <skype-dict.h>
Public Member Functions | |
| SEDict (int size) | |
| SEDict (const SEDict &dict) | |
| ~SEDict () | |
| void | insert (const KeyType &key, const ValueType &value) |
| ValueType | find (const KeyType &key, unsigned int offset=0) const |
| SEDict< KeyType, ValueType > & | operator= (const SEDict< KeyType, ValueType > &dict) |
| size_t | size () const |
| ValueType | operator[] (size_t i) const |
| KeyType | keyAt (size_t i) const |
| ValueType | value (const KeyType &key) |
| bool | remove (const KeyType &key) |
| SEList< KeyType > | keys () |
SEDict is a dictionary class of KeyType associated to ValueType.
Definition at line 31 of file skype-dict.h.
Creates an empty dictionary of KeyType/ValueType.
Definition at line 34 of file skype-dict.h.
| SEDict< KeyType, ValueType >::SEDict | ( | const SEDict< KeyType, ValueType > & | dict | ) | [inline] |
Constructs an implicitly shared copy of dict.
Definition at line 38 of file skype-dict.h.
Destroys the dictionary and frees the data if this is the last reference to it.
Definition at line 43 of file skype-dict.h.
| ValueType SEDict< KeyType, ValueType >::find | ( | const KeyType & | key, | |
| unsigned int | offset = 0 | |||
| ) | const [inline] |
Finds the specified key in the dictionary.
| key | Key to search. Default is to search for 0, which is the most often used key name in the Embedded API. | |
| offset | When the dictionary contains several entries with the same key, use the offset param to indicate which key you want. |
Definition at line 125 of file skype-dict.h.
| void SEDict< KeyType, ValueType >::insert | ( | const KeyType & | key, | |
| const ValueType & | value | |||
| ) | [inline] |
Inserts the key with the value into the dictionary. Multiple items can have the same key, they are not overwritten. You can access them with the offset parameter of the find() function. If key is null, nothing is inserted.
Definition at line 89 of file skype-dict.h.
| KeyType SEDict< KeyType, ValueType >::keyAt | ( | size_t | i | ) | const [inline] |
Use this function to iterate through the dictionary. It doesn't make sense to use this functions outside of an iteration (i.e. a loop). See also operator[]()
Definition at line 218 of file skype-dict.h.
References SEDict< KeyType, ValueType >::size().
| SEList<KeyType> SEDict< KeyType, ValueType >::keys | ( | ) | [inline] |
Definition at line 265 of file skype-dict.h.
References SEDict< KeyType, ValueType >::size().
| SEDict<KeyType, ValueType>& SEDict< KeyType, ValueType >::operator= | ( | const SEDict< KeyType, ValueType > & | dict | ) | [inline] |
Assigns a shallow copy of dict to this dictionary and returns a reference to it. This is very fast because the dictionary isn't actually copied.
Definition at line 149 of file skype-dict.h.
| ValueType SEDict< KeyType, ValueType >::operator[] | ( | size_t | i | ) | const [inline] |
Use this function to iterate through the dictionary. It doesn't make sense to use this functions outside of an iteration (i.e. a loop). See also keyAt()
Definition at line 204 of file skype-dict.h.
References SEDict< KeyType, ValueType >::size().
| bool SEDict< KeyType, ValueType >::remove | ( | const KeyType & | key | ) | [inline] |
Definition at line 233 of file skype-dict.h.
| size_t SEDict< KeyType, ValueType >::size | ( | ) | const [inline] |
Returns how many elements are in the dictionary.
Definition at line 159 of file skype-dict.h.
| ValueType SEDict< KeyType, ValueType >::value | ( | const KeyType & | key | ) | [inline] |
Definition at line 229 of file skype-dict.h.
References SEDict< KeyType, ValueType >::find().
(c) Skype Technologies S.A. Confidential/Proprietary
Last updated: Fri Jan 27 2012