6.57 ABA_LIST< Type > Class Template Reference

class ABA_LIST

#include <list.h>

Inheritance diagram for ABA_LIST< Type >::


PIC


Public Member Functions

Private Member Functions

Private Attributes

Friends

6.57.1 Detailed Description

template<class Type> class ABA_LIST< Type >

class ABA_LIST

Definition at line 56 of file list.h.

6.57.2 Constructor & Destructor Documentation

6.57.2.1 template<class Type> ABA_LIST< Type >::ABA_LIST (const ABA_GLOBAL * glob)

The constructor initializes the list with the empty list.

This is done by assigning first_ and last_ to the 0-pointer.

Parameters:

glob
A pointer to the corresponding global object.

6.57.2.2 template<class Type> ABA_LIST< Type >::~ABA_LIST ()

The destructor deallocates the memory of all items in the list.

6.57.2.3 template<class Type> ABA_LIST< Type >::ABA_LIST (const ABA_LIST< Type > & rhs) [private]

6.57.3 Member Function Documentation

6.57.3.1 template<class Type> void ABA_LIST< Type >::appendHead (const Type & elem)

Adds an element at the front of the list.

Parameters:

elem
The element being appended.

6.57.3.2 template<class Type> void ABA_LIST< Type >::appendTail (const Type & elem)

Adds an element at the end of the list.

Parameters:

elem
The element being appended.

6.57.3.3 template<class Type> int ABA_LIST< Type >::extractHead (Type & elem)

Assigns to elem the first element in the list and removes it from the list.

Returns:

0 If the operation can be be executed successfully.

1 If the list is empty.

Parameters:

elem
If the list is nonemty, the first element is assigned to elem.

6.57.3.4 template<class Type> int ABA_LIST< Type >::firstElem (Type & elem) const

Assign elem the first element as the function extractHead() but does not remove this element from the list.

Returns:

0 If the operation can be be executed successfully.

1 If the list is empty.

Parameters:

elem
If the list is nonemty, the first element is assigned to elem.

6.57.3.5 template<class Type> bool ABA_LIST< Type >::empty () const

Returns:

true If no element is contained in the list,

false otherwise.

6.57.3.6 template<class Type> ABA_LISTITEM<Type>*ABA_LIST< Type >::first () const [private]

Returns a pointer to the first item in the list.

6.57.3.7 template<class Type> ABA_LISTITEM<Type>*ABA_LIST< Type >::last () const [private]

Returns a pointer to the last item in the list.

6.57.3.8 template<class Type> void ABA_LIST< Type >::appendHead (ABA_LISTITEM< Type > * item) [private]

This version of the function appendHead() adds item at the front of the list.

6.57.3.9 template<class Type> void ABA_LIST< Type >::appendTail (ABA_LISTITEM< Type > * item) [private]

This version of the function appendTail() adds item at the end of the list.

6.57.3.10 template<class Type> const ABA_LIST<Type>& ABA_LIST< Type >::operator= (const ABA_LIST< Type > & rhs) [private]

6.57.4 Friends And Related Function Documentation

6.57.4.1 template<class Type> friend class ABA_LISTITEM< Type > [friend]

Definition at line 57 of file list.h.

6.57.4.2 template<class Type> ostream& operator<< (ostream &, const ABA_LIST< Type > & list) [friend]

The output operator writes all items of the list on an output stream.

Returns:

A reference to the output stream.

Parameters:

out
The output stream.
list
The list being output.

6.57.5 Member Data Documentation

6.57.5.1 template<class Type> const ABA_GLOBAL*ABA_LIST< Type >::glob_ [private]

A pointer to the corresponding global object.

Definition at line 154 of file list.h.

6.57.5.2 template<class Type> ABA_LISTITEM<Type>*ABA_LIST< Type >::first_ [private]

A pointer to the first item of the list.

Definition at line 158 of file list.h.

6.57.5.3 template<class Type> ABA_LISTITEM<Type>*ABA_LIST< Type >::last_ [private]

Definition at line 162 of file list.h.

The documentation for this class was generated from the following file: