decStringList Class Reference

String List. More...

#include <decStringList.h>

List of all members.

Public Member Functions

Constructors and Destructors
 decStringList ()
 Creates a new string list.
 decStringList (const decStringList &list)
 Creates a new string list as a copy of another string list.
 ~decStringList ()
 Cleans up the string list.
Management
int GetStringCount () const
 Retrieves the number of strings.
const decStringGetStringAt (int index) const
 Retrieves the string at the given index.
int IndexOfString (const decString &string) const
 Retrieves the index of the first occurance of a string or -1 if not found.
int IndexOfString (const char *string) const
 Retrieves the index of the first occurance of a string or -1 if not found.
bool HasString (const decString &string) const
 Determines if the given string is found one or more times in the list.
bool HasString (const char *string) const
 Determines if the given string is found one or more times in the list.
void AddString (const decString &string)
 Adds a string.
void AddString (const char *string)
 Adds a string.
void RemoveStringAt (int index)
 Removes the string from with the given index.
void RemoveAllStrings ()
 Removes all strings.
void SortAscending ()
 Sorts strings in ascending order.
void SortDescending ()
 Sorts strings in descending order.
Operators
const decStringoperator[] (int index) const
 Retrieves the string at the given index.
decStringListoperator= (const decStringList &list)
 Set this list to the content of another list.
decStringList operator+ (const decStringList &list) const
 Retrieves a new list containing the concatenation of this list and another one.
decStringListoperator+= (const decStringList &list)
 Appends another list to this list.
decStringList operator+ (const decString &string) const
 Retrieves a new list containing this list with the given string added to it.
decStringList operator+ (const char *string) const
 Retrieves a new list containing this list with the given string added to it.
decStringListoperator+= (const decString &string)
 Appends a string to this list.
decStringListoperator+= (const char *string)
 Appends a string to this list.

Detailed Description

String List.

Stores a list of strings. The strings in the list are allowed the be duplicates of each other but can not be NULL.

Author:
Roland Plüss
Version:
1.0
Date:
2010

Constructor & Destructor Documentation

decStringList::decStringList (  )

Creates a new string list.

decStringList::decStringList ( const decStringList list )

Creates a new string list as a copy of another string list.

decStringList::~decStringList (  )

Cleans up the string list.


Member Function Documentation

void decStringList::AddString ( const decString string )

Adds a string.

void decStringList::AddString ( const char *  string )

Adds a string.

const decString& decStringList::GetStringAt ( int  index ) const

Retrieves the string at the given index.

int decStringList::GetStringCount (  ) const [inline]

Retrieves the number of strings.

bool decStringList::HasString ( const decString string ) const

Determines if the given string is found one or more times in the list.

bool decStringList::HasString ( const char *  string ) const

Determines if the given string is found one or more times in the list.

int decStringList::IndexOfString ( const char *  string ) const

Retrieves the index of the first occurance of a string or -1 if not found.

int decStringList::IndexOfString ( const decString string ) const

Retrieves the index of the first occurance of a string or -1 if not found.

decStringList decStringList::operator+ ( const decString string ) const

Retrieves a new list containing this list with the given string added to it.

decStringList decStringList::operator+ ( const char *  string ) const

Retrieves a new list containing this list with the given string added to it.

decStringList decStringList::operator+ ( const decStringList list ) const

Retrieves a new list containing the concatenation of this list and another one.

decStringList& decStringList::operator+= ( const decStringList list )

Appends another list to this list.

decStringList& decStringList::operator+= ( const decString string )

Appends a string to this list.

decStringList& decStringList::operator+= ( const char *  string )

Appends a string to this list.

decStringList& decStringList::operator= ( const decStringList list )

Set this list to the content of another list.

const decString& decStringList::operator[] ( int  index ) const

Retrieves the string at the given index.

void decStringList::RemoveAllStrings (  )

Removes all strings.

void decStringList::RemoveStringAt ( int  index )

Removes the string from with the given index.

void decStringList::SortAscending (  )

Sorts strings in ascending order.

void decStringList::SortDescending (  )

Sorts strings in descending order.


The documentation for this class was generated from the following file: