Humble Framework for SkyOS


Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

HList< T > Class Template Reference
[Abstract Data Types]

#include <HList.h>

Inheritance diagram for HList< T >:

HObjNoCopy HObj

Detailed Description

template<class T>
class HList< T >

The HList template class is a classic "linked list" that maintains an un- ordered list of elements. Elements can be inserted or deleted dynamically.

Definition at line 24 of file HList.h.

Public Types

typedef std::list< T >::iterator HListIterator

Public Member Functions

ErrCode AddHead (const T &tData)
 Add the given element to the front (head) of the list.
ErrCode AddTail (const T &tData)
 Add the given data to the end (tail) of the list.
ErrCode InsertAfter (const T &tAfter, const T &tData)
 Inserts an element after an existing element.
ErrCode Remove (const T &tData)
 Removes an element from the list.
ErrCode RemoveAll (void)
 Removes all elements from the list.
ErrCode RemoveDuplicates (void)
 Removes all duplicate elements from the list.
ErrCode RemoveHead (void)
 Removes the first (head) node from the list.
ErrCode RemoveTail (void)
 Removes the last (tail) node from the list.
ErrCode Sort (void)
 Sorts the list into order.
const T & GetHead (void) const throw ()
 Returns the head (first) element of the list.
uint32 GetSize (void) const
 Returns a count of elements in the list.
const T & GetTail (void) const throw ()
 Returns the tail (last) element of the list.
bool Contains (const T &tData) const throw ()
 Evaluates to true if the data is already present in the list.
bool IsEmpty (void) const
 Tests whether the list is empty (zero-length) or not.
bool IsNotEmpty (void) const
 Tests whether the list is not empty, i.e., has at least one element.


Member Function Documentation

template<class T>
ErrCode HList< T >::AddHead const T &  tData  ) 
 

Returns:
ALways NO_ERROR
Parameters:
tData Data value to be added

Definition at line 61 of file HList.h.

template<class T>
ErrCode HList< T >::AddTail const T &  tData  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
tData Data value to be added

Definition at line 73 of file HList.h.

template<class T>
ErrCode HList< T >::InsertAfter const T &  tAfter,
const T &  tData
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
tAfter Element to insert data after
tData Data value to be added

Definition at line 86 of file HList.h.

template<class T>
ErrCode HList< T >::Remove const T &  tData  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
tData Element to remove

Definition at line 105 of file HList.h.

template<class T>
ErrCode HList< T >::RemoveAll void   ) 
 

Returns:
Always NO_ERROR

Definition at line 121 of file HList.h.

template<class T>
ErrCode HList< T >::RemoveDuplicates void   ) 
 

Returns:
Always NO_ERROR

Definition at line 131 of file HList.h.

template<class T>
ErrCode HList< T >::RemoveHead void   ) 
 

Returns:
NO_ERROR on success, error code otherwise

Definition at line 143 of file HList.h.

template<class T>
ErrCode HList< T >::RemoveTail void   ) 
 

Returns:
NO_ERROR on success, error code otherwise

Definition at line 160 of file HList.h.

template<class T>
ErrCode HList< T >::Sort void   ) 
 

Returns:
NO_ERROR on success, error code otherwise

Definition at line 176 of file HList.h.

template<class T>
const T& HList< T >::GetHead void   )  const throw ()
 

Returns:
Element

Definition at line 191 of file HList.h.

template<class T>
uint32 HList< T >::GetSize void   )  const
 

Returns:
Element count

Definition at line 202 of file HList.h.

template<class T>
const T& HList< T >::GetTail void   )  const throw ()
 

Returns:
Element

Definition at line 208 of file HList.h.

template<class T>
bool HList< T >::Contains const T &  tData  )  const throw ()
 

Returns:
True if found, false otherwise
Parameters:
tData Data to find

Definition at line 224 of file HList.h.

template<class T>
bool HList< T >::IsEmpty void   )  const
 

Returns:
True if list is empty (contains no elements)

Definition at line 230 of file HList.h.

template<class T>
bool HList< T >::IsNotEmpty void   )  const
 

Returns:
True if list is not empty (contains at least 1 element)

Definition at line 236 of file HList.h.


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

2006.01.09-16:37