Public Member Functions | Static Public Member Functions

SEStringList Class Reference

SEStringList represents a list of strings (SEString objects). More...

#include <skype-string-list.h>

Inheritance diagram for SEStringList:

List of all members.

Public Member Functions

 SEStringList ()
 SEStringList (const SEStringList &sl)
 ~SEStringList ()
void push_back (const SEString &str)
SEStringListappend (const SEString &str)
SEString peek ()
size_t size () const
SEString operator[] (size_t n)
const SEStringoperator[] (size_t n) const
SEStringListoperator= (const SEStringList &sl)
SEString join (const SEString &sep, bool escape_args=true) const
bool contains (const SEString &val)
bool remove_val (const SEString &val)
bool remove_pos (const unsigned int pos)
int find_pos (const SEString &val)
void resize (const unsigned int new_size)
void clear ()

Static Public Member Functions

static SEStringList split (const SEString &str, char sep, char esc= '\\')

Detailed Description

SEStringList represents a list of strings (SEString objects).

The operator [] is supported, which can be used to go through the list.

Examples:

tutorial_11.cpp, tutorial_13.cpp, tutorial_14.cpp, tutorial_16.cpp, tutorial_2.cpp, tutorial_5.cpp, tutorial_6.cpp, and tutorial_7.cpp.

Definition at line 13 of file skype-string-list.h.


Constructor & Destructor Documentation

SEStringList::SEStringList (  ) 

Creates an empty list of strings.

Definition at line 35 of file skype-string-list.cpp.

SEStringList::SEStringList ( const SEStringList sl  ) 

Constructs an implicitly shared copy of sl.

Definition at line 41 of file skype-string-list.cpp.

SEStringList::~SEStringList (  ) 

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

Definition at line 47 of file skype-string-list.cpp.


Member Function Documentation

SEStringList & SEStringList::append ( const SEString str  ) 

Appends a string at the end of the list.

this

Examples:
tutorial_16.cpp, tutorial_2.cpp, and tutorial_7.cpp.

Definition at line 67 of file skype-string-list.cpp.

References SEString::isNull().

void SEStringList::clear (  ) 

Definition at line 513 of file skype-string-list.cpp.

References size().

bool SEStringList::contains ( const SEString val  ) 

Definition at line 468 of file skype-string-list.cpp.

References find_pos().

int SEStringList::find_pos ( const SEString val  ) 

Definition at line 456 of file skype-string-list.cpp.

References size().

SEString SEStringList::join ( const SEString sep,
bool  escape_args = true 
) const

Creates a string out of the list of strings by joining them.

Parameters:
sep String to use as a separator between each joined string.
escape_args Should the parameters be escaped before joining them.

Definition at line 304 of file skype-string-list.cpp.

References operator[](), and size().

SEStringList & SEStringList::operator= ( const SEStringList sl  ) 

Assigns a shallow copy of sl to this list and returns a reference to it. This is very fast because the list isn't actually copied.

Definition at line 200 of file skype-string-list.cpp.

SEString SEStringList::operator[] ( size_t  n  ) 

Returns the string specified by its index.

Definition at line 190 of file skype-string-list.cpp.

References size().

const SEString & SEStringList::operator[] ( size_t  n  )  const

Returns a string reference specified by its index.

Reimplemented in SEFilenameList.

Definition at line 182 of file skype-string-list.cpp.

References empty, and size().

SEString SEStringList::peek (  ) 

Removes the first element from the list and returns it.

Definition at line 119 of file skype-string-list.cpp.

void SEStringList::push_back ( const SEString str  )  [inline]

Appends a string at the end of the list.

Definition at line 33 of file skype-string-list.h.

References append().

bool SEStringList::remove_pos ( const unsigned int  pos  ) 

Definition at line 481 of file skype-string-list.cpp.

References size().

bool SEStringList::remove_val ( const SEString val  ) 

Definition at line 473 of file skype-string-list.cpp.

References find_pos(), and remove_pos().

void SEStringList::resize ( const unsigned int  new_size  ) 

Definition at line 414 of file skype-string-list.cpp.

References clear(), and size().

size_t SEStringList::size (  )  const

Returns the size of the list.

Examples:
tutorial_11.cpp, tutorial_13.cpp, tutorial_5.cpp, tutorial_6.cpp, and tutorial_7.cpp.

Definition at line 144 of file skype-string-list.cpp.

SEStringList SEStringList::split ( const SEString str,
char  sep,
char  esc = '\\' 
) [static]

Splits a string in a list of string using the separaror sep.

Definition at line 319 of file skype-string-list.cpp.

References append(), SEString::length(), and SEString::substr().


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 Jan 27 2012