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 |
| typedef const_literator | const_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 |
| void | clone_list (const list &x) |
| void | init_list () |
| unsigned | m_nLength |
| iterator | m_begin |
| iterator | m_end |
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
template<class T>
typedef const_literator list<T>::const_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 file:
- /home/cunkel/doxygen-gen/nci/suif/suif2b/common/suif_list.h
Generated at Wed Apr 25 17:35:20 2001 for NCI SUIF by
written by Dimitri van Heesch, © 1997-1999