wstring_list_ty Class Reference
[WStringList]
#include <list.h>
Detailed Description
The
wstring_list_ty class is used to represent a list of
wstring_ty elements.
- Note:
- This is the inner declaration of wstring_list; if at all possible, use the wstring_list class instead.
Definition at line 39 of file list.h.
Constructor & Destructor Documentation
wstring_list_ty::~wstring_list_ty |
( |
|
) |
|
The destructor.
- Note:
- It is not virtual. Do not derive from this class.
wstring_list_ty::wstring_list_ty |
( |
|
) |
|
Member Function Documentation
size_t wstring_list_ty::size |
( |
|
) |
const [inline] |
The size method may be used to determine how many items are in the wide strinbg list.
Definition at line 69 of file list.h.
bool wstring_list_ty::empty |
( |
|
) |
const [inline] |
The empty method is used to determine whether the wide string list is empty (contains no wide strings).
Definition at line 75 of file list.h.
wstring_ty* wstring_list_ty::get |
( |
size_t |
n |
) |
const [inline] |
The get method is used to obtain the Nth wide string pointer.
- Parameters:
-
| n | The zero-based string index. |
- Note:
- No range checking is performed.
Definition at line 85 of file list.h.
wstring_ty* wstring_list_ty::operator[] |
( |
size_t |
n |
) |
const [inline] |
The [] operator is used to obtain the Nth wide string pointer.
- Parameters:
-
| n | The zero-based string index. |
- Note:
- No range checking is performed.
Definition at line 95 of file list.h.
void wstring_list_ty::clear |
( |
|
) |
|
The clear method is used to discard all elements of the list.
void wstring_list_ty::push_back |
( |
wstring_ty * |
arg |
) |
|
The push_back mthod is used to append to a wide string list. This is an O(1) operation.
- Parameters:
-
| arg | The string to be appended to the list. |
The push_back method is used to append to a wide string list to the end of this list. This is an O(n) operation.
- Parameters:
-
| arg | The string list to be appended to the list. |
void wstring_list_ty::pop_back |
( |
|
) |
|
The pop_back method is used to discard the last element of the list.
void wstring_list_ty::push_back_unique |
( |
wstring_ty * |
arg |
) |
|
The push_back_unique method is similar to the push_back method, however it does not append the wide string if it is already in the list.
- Parameters:
-
| arg | The wide string to conditionally append to a wide string list. |
void wstring_list_ty::push_front |
( |
wstring_ty * |
arg |
) |
|
The push_front method is used to prepend to a wide string list. Note that this is an O(n) operation.
- Parameters:
-
| arg | The string to be appended to the list. |
bool wstring_list_ty::member |
( |
wstring_ty * |
arg |
) |
const |
The member method is used to determine whether the given wide string is a member of this list. This is an O(n) operation.
- Parameters:
-
| arg | The wide string to look for. |
- Returns:
- bool; true if the string is present, false if it is not.
The remove method is used to remove a wide string from a wide string list. It is not an error if the string is not a list member.
- Parameters:
-
| arg | The wide string to remove. |
wstring_ty* wstring_list_ty::unsplit |
( |
size_t |
start, |
|
|
size_t |
stop, |
|
|
const char * |
sep = 0 | |
|
) |
| | const |
The unsplit method is used to form a wide string from a wide string list.
- Parameters:
-
| start | The first element to use. |
| stop | The last element to be used (NOT one past it, as is common for C++ functions). |
| sep | The separator string to use between elements. If NULL a single space will be used. |
wstring_ty* wstring_list_ty::unsplit |
( |
const char * |
sep = 0 |
) |
const |
The unsplit method is used to form a wide string from a wide string list. All emelents will be used.
- Parameters:
-
| sep | The separator string to use between elements. If NULL a single space will be used. |
void wstring_list_ty::split |
( |
wstring_ty * |
wis, |
|
|
const char * |
sep = 0 , |
|
|
bool |
ewhite = false | |
|
) |
| | |
The split method is used to split a wide string into compendent pieces.
- Parameters:
-
| wis | The wide string to be split. |
| sep | The separator charactres. Any one of these will split. Defauls to all white space characters. |
| ewhite | True if should discard extra while space at the start and end of each piece. Defaults to false. |
The equal_to method is used to test whether this wide string list is equal to another wide string list. The order of elements is not relevant.
- Parameters:
-
| rhs | The other string list to compare against. |
The is_a_subset_of method is used to test whether this wide string list is an improper subset of another wide string list. The order of elements is not relevant.
- Parameters:
-
| rhs | The other string list to compare against. |
Field Documentation
The nitems instance variable is used to remember how many elements of the "item" array have been used.
Definition at line 230 of file list.h.
The nitems_max instance variable is used to remember how many elements have been allocated in the "item" array.
Definition at line 236 of file list.h.
The items instance variable is used to remember the base of an arrat of wide string pointers.
Definition at line 242 of file list.h.
The documentation for this class was generated from the following file: