Public Member Functions

SEStringDict Class Reference

SEStringDict is a dictionary class of strings associated to strings. More...

#include <skype-string-dict.h>

List of all members.

Public Member Functions

 SEStringDict ()
 SEStringDict (const SEStringDict &dict)
 ~SEStringDict ()
void insert (const SEString &key, const SEString &value)
SEString find (const SEString &key="0", unsigned int offset=0) const
SEStringDictoperator= (const SEStringDict &dict)
size_t size () const
SEString operator[] (size_t i) const
SEString keyAt (size_t i) const

Detailed Description

SEStringDict is a dictionary class of strings associated to strings.

Definition at line 14 of file skype-string-dict.h.


Constructor & Destructor Documentation

SEStringDict::SEStringDict (  ) 

Creates an empty dictionary of string/string.

Definition at line 52 of file skype-string-dict.cpp.

SEStringDict::SEStringDict ( const SEStringDict dict  ) 

Constructs an implicitly shared copy of dict.

Definition at line 58 of file skype-string-dict.cpp.

SEStringDict::~SEStringDict (  ) 

Destroys the dictionary and frees the data if this is the last reference to it.

Definition at line 64 of file skype-string-dict.cpp.


Member Function Documentation

SEString SEStringDict::find ( const SEString key = "0",
unsigned int  offset = 0 
) const

Finds the specified key in the dictionary.

Parameters:
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.
Returns:
null string if the key is not found.

Definition at line 97 of file skype-string-dict.cpp.

References SEString::hash(), and SIZE.

void SEStringDict::insert ( const SEString key,
const SEString 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 69 of file skype-string-dict.cpp.

References SEString::hash(), SEString::isNull(), and SIZE.

SEString SEStringDict::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 343 of file skype-string-dict.cpp.

References size().

SEStringDict & SEStringDict::operator= ( const SEStringDict dict  ) 

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 144 of file skype-string-dict.cpp.

SEString SEStringDict::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 331 of file skype-string-dict.cpp.

References size().

size_t SEStringDict::size (  )  const

Returns how many elements are in the dictionary.

Definition at line 289 of file skype-string-dict.cpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

(c) Skype Technologies S.A. Confidential/Proprietary

Last updated: Fri Mar 16 2012