Public Member Functions

SEIntDict Class Reference

SEIntDict is a dictionary class of integers associated to strings. More...

#include <skype-int-dict.h>

List of all members.

Public Member Functions

 SEIntDict ()
 SEIntDict (const SEIntDict &dict)
 ~SEIntDict ()
void insert (const int key, const SEString &new_value, bool replace_only=false)
SEString find (const int key) const
SEIntDictoperator= (const SEIntDict &dict)
size_t size () const
SEString operator[] (size_t i) const
int keyAt (size_t i) const

Detailed Description

SEIntDict is a dictionary class of integers associated to strings.

It is used to set or retrieve multiple properties at once (see the SEObject class).

Examples:

tutorial_2.cpp, and tutorial_3.cpp.

Definition at line 16 of file skype-int-dict.h.


Constructor & Destructor Documentation

SEIntDict::SEIntDict (  ) 

Creates an empty dictionary of integers.

Definition at line 49 of file skype-int-dict.cpp.

SEIntDict::SEIntDict ( const SEIntDict dict  ) 

Constructs an implicitly shared copy of dict.

Definition at line 54 of file skype-int-dict.cpp.

SEIntDict::~SEIntDict (  ) 

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

Definition at line 60 of file skype-int-dict.cpp.


Member Function Documentation

SEString SEIntDict::find ( const int  key  )  const

Finds the value correspinding to the key.

Examples:
tutorial_2.cpp.

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

References SIZE.

void SEIntDict::insert ( const int  key,
const SEString new_value,
bool  replace_only = false 
)

Insert a value into dictionary. If the key already exists, replace.

Parameters:
key 
value 
replace_only Do not insert, if key is not found, only replace.

Definition at line 65 of file skype-int-dict.cpp.

References SIZE.

int SEIntDict::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 298 of file skype-int-dict.cpp.

References size().

SEIntDict & SEIntDict::operator= ( const SEIntDict 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 139 of file skype-int-dict.cpp.

SEString SEIntDict::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 286 of file skype-int-dict.cpp.

References size().

size_t SEIntDict::size (  )  const

Returns how many elements are in the dictionary.

Definition at line 244 of file skype-int-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