#include <include/EST_TList.h>

Classes | |
| struct | IPointer |
Public Member Functions | |
| void | init () |
Constructor functions | |
| EST_TList () | |
| default constructor | |
| EST_TList (const EST_TList< T > &l) | |
| copy constructor | |
| ~ EST_TList () | |
Access functions for reading and writing items. | |
See \Ref{EST_TList_Accessing} for examples. | |
| T & | item (const EST_Litem *p) |
| const T & | item (const EST_Litem *p) const |
| T & | nth (int n) |
| return the Nth value | |
| const T & | nth (int n) const |
| return a const Nth value | |
| const T & | first () const |
| return const reference to first item in list | |
| const T & | last () const |
| return const reference to last item in list | |
| T & | first () |
| T & | last () |
| return reference to last item in list | |
| const T & | operator() (const EST_Litem *ptr) const |
| return const reference to item in list pointed to by {\tt ptr} | |
| T & | operator() (const EST_Litem *ptr) |
| return non-const reference to item in list pointed to by {\tt ptr} | |
Removing items in a list. | |
more. | |
| EST_Litem * | remove (EST_Litem *ptr) |
| EST_Litem * | remove_nth (int n) |
| remove nth item, return pointer to previous item | |
Adding items to a list. | |
In all cases, a complete copy of the item is made and added to the list. See \Ref{Addition} for examples. | |
| void | append (const T &item) |
| add item onto end of list | |
| void | prepend (const T &item) |
| add item onto start of list | |
| EST_Litem * | insert_after (EST_Litem *ptr, const T &item) |
| EST_Litem * | insert_before (EST_Litem *ptr, const T &item) |
Static Public Member Functions | |
| static void | free_item (EST_UItem *item) |
Exchange | |
| void | exchange (EST_Litem *a, EST_Litem *b) |
| exchange 1 | |
| void | exchange (int i, int j) |
| exchange 2 | |
| static void | exchange_contents (EST_Litem *a, EST_Litem *b) |
| exchange 3 | |
General functions | |
| typedef T | Entry |
| typedef EST_TIterator< EST_TList< T >, IPointer, T > | Entries |
| typedef EST_TRwIterator< EST_TList< T >, IPointer, T > | RwEntries |
| class | EST_TIterator< EST_TList< T >, IPointer, T > |
| class | EST_TRwIterator< EST_TList< T >, IPointer, T > |
| ostream & | operator<< (ostream &st, EST_TList< T > const &list) |
| print list | |
| EST_TList< T > & | operator= (const EST_TList< T > &a) |
| make full copy of list | |
| EST_TList< T > & | operator+= (const EST_TList< T > &a) |
| Add list onto end of existing list. | |
| void | clear (void) |
| remove all items in list | |
| void | point_to_first (IPointer &ip) const |
| void | move_pointer_forwards (IPointer &ip) const |
| bool | points_to_something (const IPointer &ip) const |
| T & | points_at (const IPointer &ip) |
A Template doubly linked list class. This class contains doubly linked lists of a type denoted by {\tt T}. A pointer of type \Ref{EST_Litem} is used to access items in the list. The class supports a variety of ways of adding, removing and accessing items in the list. For examples of how to operate lists, see \Ref{list_example}.
Iteration through the list is performed using a pointer of type \Ref{EST_Litem}. See \Ref{Iteration} for example code.
Definition at line 108 of file EST_TList.h.
return the value associated with the EST_Litem pointer. This has the same functionality as the overloaded () operator.
Definition at line 133 of file EST_TList.h.
return a const value associated with the EST_Litem pointer.
Definition at line 136 of file EST_TList.h.
|
inline |
remove item pointed to by {\tt ptr}, return pointer to previous item. See \Ref{Removing} for example code.
Definition at line 175 of file EST_TList.h.
|
inline |
add {\tt item} after position given by {\tt ptr}, return pointer to added item.
Definition at line 200 of file EST_TList.h.
|
inline |
add {\tt item} before position given by {\tt ptr}, return pointer to added item.
Definition at line 206 of file EST_TList.h.