lists of objects of arbitrary type T.
![]() | List () create an empty list. |
![]() | ~List () delete entire list (but not the elements of the list). |
![]() | List (const List create list, initialized by elements of l. |
![]() | operator= (const List copy list into an other, elements are copied too (e.g. l2 = l1). |
![]() | add (const T &e) add e to the end of the list. |
![]() | insert (const T &e, const unsigned i) insert e to i+1'th position of the list. |
![]() | find (const T &e) const return index of first element equal to e, if not found, return -1. |
![]() | isSet () const return list is set |
![]() | count (const T &e) const count the number of times e occurs in the list |
![]() | contains (List return if list contains list l |
![]() | contains (const T &e) const return if list contains e. |
![]() | remove (const T &e) remove all elements equal to e. |
![]() | removei (const unsigned i = 0) removes i+1'th element (0 <= i <= count()-1). |
![]() | removecur () removes current element and advances the current to the next one. |
![]() | empty () removes all elements from list. |
![]() | clear () removes all elements + free elements (which should be pointers). |
![]() | operator[] (const unsigned i) const returns ref. to i+1'th element, like array index (e.g. e = l[5]). |
![]() | elem (const unsigned i) const same as [] (different syntax). |
![]() | count () const returns number of elements in list. |
![]() | replace (const T &old, const T &fresh) replaces all elements equal to old by new. |
![]() | sort (int (*cmp)(T, T)) sort all elements according to cmp function. |
![]() | reverse () reverse all elements in list. |
![]() | first () return if there is a first element + sets current to first element. |
![]() | last () sets current to last element + returns if there is a last element. |
![]() | next () sets current to next element + returns if there is a next element. |
![]() | prev () sets current to prev. element + returns if there is a prev. element. |
![]() | cur () const returns current element (Check first with 'done'!) |
![]() | done () const returns if current is out of list. |
![]() | setcur (const T &) returns if T is in list + sets current to that element. |
lists of objects of arbitrary type T.
virtual ~List()
List(const List
List
void add(const T &e)
void insert(const T &e, const unsigned i)
int find(const T &e) const
bool isSet() const
int count(const T &e) const
bool contains(List
bool contains(const T &e) const
void remove(const T &e)
void removei(const unsigned i = 0)
bool removecur()
void empty()
virtual void clear()
T& operator[] (const unsigned i) const
T& elem(const unsigned i) const
unsigned count() const
void replace(const T &old, const T &fresh)
void sort(int (*cmp)(T, T))
void reverse()
int first()
int last()
int next()
int prev()
T& cur() const
bool done() const
int setcur(const T &)
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de