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:
List of all members.Public Members
- typedef T value_type
- typedef literator iterator
- list ()
- ~list ()
- void clear_list ()
- Empty the list.
- bool empty () const
- is the list empty.
- unsigned length () const
- Number of elements in list.
- unsigned size () const
- Number of elements in list.
- iterator insert (const iterator& pos, const T& x)
- Insert an element into the list at the iterator position.
- iterator get_nth (int pos) const
- Get the nth entry as an iterator. More...
- iterator insert (int pos,const T& y)
- Insert before a given position (0 for front of list).
- iterator begin ()
- iterator begin () const
- iterator end ()
- iterator end () const
- void push_front (const T& x)
- Push to front of list.
- void pop_front ()
- Pop from front of list.
- void push_back (const T& x)
- Push to back of list.
- void pop_back ()
- Pop from back of list.
- T& front ()
- Get reference to first element.
- T& back ()
- Get reference to last element.
- T& operator[] (int i) const
- Index operation (slow).
- iterator 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.
- iterator erase (int pos)
- Erase item at pos and return iterator pointing at following item.
- list& operator= (const list &x)
- list (const list &x)
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
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> ()
template<class T>
bool list<T>::empty () const
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)
template<class T>
void list<T>::pop_front ()
template<class T>
void list<T>::push_back (const T & x)
template<class T>
void list<T>::pop_back ()
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
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
written by Dimitri van Heesch, © 1997-1999