Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

list Class Reference

This is largely compatible with the STL list class, but simpler. More...

#include <common/suif_list.h>

Class diagram for list:

searchable_list

List of all members.

Public Members

Protected Members


Detailed Description

template<class T> class list

This is largely compatible with the STL list class, but simpler.

It should be possible to replace it with the STL version, if your compiler is capable of compiling STL code. The motivation for this class is to support compilers that cannot handle STL.


Member Typedef Documentation

template<class T>
typedef T list<T>::value_type

template<class T>
typedef literator list<T>::iterator

Reimplemented in searchable_list.


Member Function Documentation

template<class T>
list<T>::list<T> ()

template<class T>
list<T>::~list<T> ()

template<class T>
void list<T>::clear_list<T> ()

Empty the list.

template<class T>
bool list<T>::empty () const

is the list empty.

template<class T>
unsigned list<T>::length () const

Number of elements in list.

template<class T>
unsigned list<T>::size () const

Number of elements in list.

template<class T>
iterator list<T>::insert (const iterator & pos, const T & x)

Insert an element into the list at the iterator position.

template<class T>
iterator list<T>::get_nth (int pos) const

Get the nth entry as an iterator.

Returns end() if not found

Warning:
0 is first element ! values < 0 return first element too.

template<class T>
iterator list<T>::insert (int pos, const T & y)

Insert before a given position (0 for front of list).

template<class T>
iterator list<T>::begin ()

template<class T>
iterator list<T>::begin () const

template<class T>
iterator list<T>::end ()

template<class T>
iterator list<T>::end () const

template<class T>
void list<T>::push_front (const T & x)

Push to front of list.

template<class T>
void list<T>::pop_front ()

Pop from front of list.

template<class T>
void list<T>::push_back (const T & x)

Push to back of list.

template<class T>
void list<T>::pop_back ()

Pop from back of list.

template<class T>
T & list<T>::front ()

Get reference to first element.

template<class T>
T & list<T>::back ()

Get reference to last element.

template<class T>
T & list<T>::operator[] (int i) const

Index operation (slow).

template<class T>
iterator list<T>::erase (const iterator & pos)

Remove the item at the given iterator position

Warning:
- the parameter iterator is invalid upon return - use the returned iterator instead.

template<class T>
iterator list<T>::erase (int pos)

Erase item at pos and return iterator pointing at following item.

template<class T>
list<T> & list<T>::operator= (const list<T> & x)

template<class T>
list<T>::list<T> (const list<T> & x)

template<class T>
void list<T>::clone_list<T> (const list<T> & x) [protected]

template<class T>
void list<T>::init_list<T> () [protected]


Member Data Documentation

template<class T>
unsigned list<T>::m_nLength [protected]

template<class T>
iterator list<T>::m_begin [protected]

template<class T>
iterator list<T>::m_end [protected]


The documentation for this class was generated from the following files:
Generated at Mon Nov 22 19:43:59 1999 for NCI SUIF by doxygen  written by Dimitri van Heesch, © 1997-1999