Drag[en]gine Game Engine
1.21
|
Ordered list of strings. More...
#include <decStringList.h>
Public Member Functions | |
Constructors and Destructors | |
decStringList () | |
Create new string list. More... | |
decStringList (const decStringList &list) | |
Create new string list as a copy of another string list. More... | |
~decStringList () | |
Clean up string list. More... | |
Management | |
int | GetCount () const |
Number of strings. More... | |
const decString & | GetAt (int index) const |
String at the given index. More... | |
void | SetAt (int index, const decString &string) |
Set string at the given index. More... | |
void | SetAt (int index, const char *string) |
int | IndexOf (const decString &string) const |
Index of the first occurance of a string or -1 if not found. More... | |
int | IndexOf (const char *string) const |
bool | Has (const decString &string) const |
Given string is found one or more times in the list. More... | |
bool | Has (const char *string) const |
void | Add (const decString &string) |
Adds a string. More... | |
void | Add (const char *string) |
void | InsertAt (const decString &string, int index) |
Inserts a string. More... | |
void | InsertAt (const char *string, int index) |
void | Move (int from, int to) |
Moves a string to a new position. More... | |
void | RemoveFrom (int index) |
Removes the string from with the given index. More... | |
void | RemoveAll () |
Removes all strings. More... | |
void | SortAscending () |
Sorts strings in ascending order. More... | |
void | SortDescending () |
Sorts strings in descending order. More... | |
decStringList | Splice (int first) const |
Get sub range of string list. More... | |
decStringList | Splice (int first, int last) const |
Get sub range of string list. More... | |
decString | Join (const decString &separator) const |
Entries joined to a single string. More... | |
decString | Join (const char *separator) const |
Entries joined to a single string. More... | |
Operators | |
const decString & | operator[] (int index) const |
String at the given index. More... | |
decStringList & | operator= (const decStringList &list) |
Set this list to the content of another list. More... | |
bool | operator== (const decStringList &list) const |
Determines if this list is equal to another list. More... | |
bool | operator!= (const decStringList &list) const |
Determines if this list is not equal to another list. More... | |
decStringList | operator+ (const decStringList &list) const |
Retrieves a new list containing the concatenation of this list and another one. More... | |
decStringList & | operator+= (const decStringList &list) |
Appends another list to this list. More... | |
decStringList | operator+ (const decString &string) const |
Retrieves a new list containing this list with the given string added to it. More... | |
decStringList | operator+ (const char *string) const |
Retrieves a new list containing this list with the given string added to it. More... | |
decStringList & | operator+= (const decString &string) |
Appends a string to this list. More... | |
decStringList & | operator+= (const char *string) |
Appends a string to this list. More... | |
Ordered list of strings.
The strings in the list are allowed the be duplicates of each other but can not be NULL.
decStringList::decStringList | ( | ) |
Create new string list.
decStringList::decStringList | ( | const decStringList & | list | ) |
Create new string list as a copy of another string list.
decStringList::~decStringList | ( | ) |
Clean up string list.
void decStringList::Add | ( | const char * | string | ) |
void decStringList::Add | ( | const decString & | string | ) |
Adds a string.
const decString& decStringList::GetAt | ( | int | index | ) | const |
String at the given index.
|
inline |
Number of strings.
bool decStringList::Has | ( | const char * | string | ) | const |
bool decStringList::Has | ( | const decString & | string | ) | const |
Given string is found one or more times in the list.
int decStringList::IndexOf | ( | const char * | string | ) | const |
int decStringList::IndexOf | ( | const decString & | string | ) | const |
Index of the first occurance of a string or -1 if not found.
void decStringList::InsertAt | ( | const char * | string, |
int | index | ||
) |
void decStringList::InsertAt | ( | const decString & | string, |
int | index | ||
) |
Inserts a string.
decString decStringList::Join | ( | const char * | separator | ) | const |
Entries joined to a single string.
deeInvalidParam | separator is NULL. |
Entries joined to a single string.
void decStringList::Move | ( | int | from, |
int | to | ||
) |
Moves a string to a new position.
bool decStringList::operator!= | ( | const decStringList & | list | ) | const |
Determines if this list is not equal to another list.
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 decString & | 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 char * | string | ) |
Appends a string to this list.
decStringList& decStringList::operator+= | ( | const decString & | string | ) |
Appends a string to this list.
decStringList& decStringList::operator+= | ( | const decStringList & | list | ) |
Appends another list to this list.
decStringList& decStringList::operator= | ( | const decStringList & | list | ) |
Set this list to the content of another list.
bool decStringList::operator== | ( | const decStringList & | list | ) | const |
Determines if this list is equal to another list.
const decString& decStringList::operator[] | ( | int | index | ) | const |
String at the given index.
void decStringList::RemoveAll | ( | ) |
Removes all strings.
void decStringList::RemoveFrom | ( | int | index | ) |
Removes the string from with the given index.
void decStringList::SetAt | ( | int | index, |
const char * | string | ||
) |
void decStringList::SetAt | ( | int | index, |
const decString & | string | ||
) |
Set string at the given index.
void decStringList::SortAscending | ( | ) |
Sorts strings in ascending order.
void decStringList::SortDescending | ( | ) |
Sorts strings in descending order.
decStringList decStringList::Splice | ( | int | first | ) | const |
Get sub range of string list.
decStringList decStringList::Splice | ( | int | first, |
int | last | ||
) | const |
Get sub range of string list.