wstring_list_ty Class Reference
[WStringList]

#include <list.h>


Public Member Functions

 ~wstring_list_ty ()
 wstring_list_ty ()
 wstring_list_ty (const wstring_list_ty &)
wstring_list_tyoperator= (const wstring_list_ty &)
size_t size () const
bool empty () const
wstring_tyget (size_t n) const
wstring_tyoperator[] (size_t n) const
void clear ()
void push_back (wstring_ty *arg)
void push_back (const wstring_list_ty &arg)
void pop_back ()
void push_back_unique (wstring_ty *arg)
void push_front (wstring_ty *arg)
bool member (wstring_ty *arg) const
void remove (wstring_ty *arg)
wstring_tyunsplit (size_t start, size_t stop, const char *sep=0) const
wstring_tyunsplit (const char *sep=0) const
void split (wstring_ty *wis, const char *sep=0, bool ewhite=false)
bool equal_to (const wstring_list_ty &rhs) const
bool is_a_subset_of (const wstring_list_ty &rhs) const

Private Attributes

size_t nitems
size_t nitems_max
wstring_ty ** item


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 (  ) 

The default constructor.

wstring_list_ty::wstring_list_ty ( const wstring_list_ty  ) 

The copy constructor.


Member Function Documentation

wstring_list_ty& wstring_list_ty::operator= ( const wstring_list_ty  ) 

The assignment operator.

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.

void wstring_list_ty::push_back ( const wstring_list_ty arg  ) 

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.

void wstring_list_ty::remove ( wstring_ty arg  ) 

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.

bool wstring_list_ty::equal_to ( const wstring_list_ty rhs  )  const

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.

bool wstring_list_ty::is_a_subset_of ( const wstring_list_ty rhs  )  const

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

size_t wstring_list_ty::nitems [private]

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.

size_t wstring_list_ty::nitems_max [private]

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:

Generated on Wed Mar 12 23:37:45 2008 for Aegis by  doxygen 1.5.5