Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

base::LinkableEnumerator Class Reference

Generic enumerator for linkables: enumerate on a table of linkables. More...

#include <Enumerator.h>

Inheritance diagram for base::LinkableEnumerator:

base::Enumerator< T > List of all members.

Public Member Functions

 LinkableEnumerator (size_t sizeOfTable, SingleLinkable_t **theTable)
 Constructor:.
SingleLinkable_tgetNextLinkable ()
 Enumerate all the nodes in the table.

Private Attributes

size_t size
 size of the table
SingleLinkable_t ** table
 table of linkables
SingleLinkable_tcurrent
 current node in enumeration

Detailed Description

Generic enumerator for linkables: enumerate on a table of linkables.

Typically, this is used in hash tables.


Constructor & Destructor Documentation

base::LinkableEnumerator::LinkableEnumerator size_t  sizeOfTable,
SingleLinkable_t **  theTable
[inline]
 

Constructor:.

Parameters:
sizeOfTable,: size of the table of linkables
theTable,: table of linkables
Precondition:
theTable is a Linkable_t*[sizeOfTable]


Member Function Documentation

SingleLinkable_t * base::LinkableEnumerator::getNextLinkable  ) 
 

Enumerate all the nodes in the table.

The order is not specified. In practice we start from the beginning of the table and we enumerate all nodes in natural order.

Returns:
next linkable, or NULL if there are no linkable left.
Postcondition:
internal state is changed to return the next linkable everytime the method is called.


Member Data Documentation

SingleLinkable_t* base::LinkableEnumerator::current [private]
 

current node in enumeration

size_t base::LinkableEnumerator::size [private]
 

size of the table

SingleLinkable_t** base::LinkableEnumerator::table [private]
 

table of linkables


The documentation for this class was generated from the following files:
Generated on Fri Jun 30 00:02:30 2006 for Module base by  doxygen 1.4.2