SEObjDict is a dictionary class of SEObject pointers associated to integers. More...
#include <skype-obj-dict.h>
Public Member Functions | |
| SEObjDict () | |
| SEObjDict (const SEObjDict &dict) | |
| ~SEObjDict () | |
| void | insert (const int key, const SEObject *value) |
| const SEObject *& | find (const int key, unsigned int offset=0) const |
| SEObjDict & | operator= (const SEObjDict &dict) |
| size_t | size () const |
| const SEObject *& | operator[] (size_t i) const |
| int | keyAt (size_t i) const |
| bool | remove (const int key) |
| const SEObject *& | value (const int key) |
| SEIntList | keys () |
SEObjDict is a dictionary class of SEObject pointers associated to integers.
Definition at line 14 of file skype-obj-dict.h.
| SEObjDict::SEObjDict | ( | ) |
Creates an empty dictionary of pointers.
Definition at line 50 of file skype-obj-dict.cpp.
| SEObjDict::SEObjDict | ( | const SEObjDict & | dict | ) |
Constructs an implicitly shared copy of dict.
Definition at line 56 of file skype-obj-dict.cpp.
| SEObjDict::~SEObjDict | ( | ) |
Destroys the dictionary and frees the data if this is the last reference to it.
Definition at line 62 of file skype-obj-dict.cpp.
| const SEObject *& SEObjDict::find | ( | const int | key, | |
| unsigned int | offset = 0 | |||
| ) | const |
Finds the specified key in the dictionary.
| key | Key to search. | |
| offset | When the dictionary contains several entries with the same key, use the offset param to indicate which key you want. |
Definition at line 100 of file skype-obj-dict.cpp.
References SIZE.
| void SEObjDict::insert | ( | const int | key, | |
| const SEObject * | value | |||
| ) |
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 67 of file skype-obj-dict.cpp.
References SIZE.
| int SEObjDict::keyAt | ( | size_t | i | ) | const |
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 283 of file skype-obj-dict.cpp.
References size().
| SEIntList SEObjDict::keys | ( | ) |
Definition at line 327 of file skype-obj-dict.cpp.
References SEIntList::append(), and size().
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 124 of file skype-obj-dict.cpp.
| const SEObject *& SEObjDict::operator[] | ( | size_t | i | ) | const |
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 270 of file skype-obj-dict.cpp.
References size().
| bool SEObjDict::remove | ( | const int | key | ) |
Definition at line 294 of file skype-obj-dict.cpp.
| size_t SEObjDict::size | ( | ) | const |
Returns how many elements are in the dictionary.
Definition at line 228 of file skype-obj-dict.cpp.
| const SEObject*& SEObjDict::value | ( | const int | key | ) | [inline] |
Definition at line 66 of file skype-obj-dict.h.
References find().
(c) Skype Technologies S.A. Confidential/Proprietary
Last updated: Fri Mar 16 2012