se_core::HashTable< T, poolSize >::NodeList Struct Reference

#include <HashTable.hpp>

Inheritance diagram for se_core::HashTable< T, poolSize >::NodeList:

se_core::SinglyLinkedList< HashTableNode, poolSize, 97 > List of all members.

Public Types

typedef int iterator_type

Public Member Functions

 NodeList (const char *name)
void add (HashTableNode *element, iterator_type &firstNode)
 Add member to a list.
HashTableNoderemove (iterator_type &iterator, const iterator_type &previousElement)
 Remove a member from the the list.
bool remove (HashTableNode *element, iterator_type &firstNode)
 Remove an element from the list.
HashTableNodepop (iterator_type &iterator)
 Remove and return topmost element in list.
void removeChain (iterator_type &firstNode)
 Remove the chain Remove all members from the singly linked list.
bool hasElement (HashTableNode *element, iterator_type &firstNode)
 Check if an element exists in a singly linked list.
HashTableNodenext (iterator_type &iterator)
 Iterate to the next member of a singly linked list The iterator is a iterator_type value that should initially have the index of the first node in the list as its value.
int size (const iterator_type &firstNode)
 The number of members in a list.
int capacity ()
bool isFree (const iterator_type &it)
void clear ()
 Remove all singly linked lists.

Static Public Member Functions

const iterator_type end ()
 Returns the value that terminates the loop.

Protected Member Functions

 DebugExec (int count_)

Protected Attributes

const char * name_
 The name of this container instance (included to ease debugging).

template<class T, int poolSize>
struct se_core::HashTable< T, poolSize >::NodeList


Member Typedef Documentation

typedef int se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::iterator_type [inherited]
 

Definition at line 40 of file SinglyLinkedList.hpp.


Constructor & Destructor Documentation

template<class T, int poolSize>
se_core::HashTable< T, poolSize >::NodeList::NodeList const char *  name  )  [inline]
 

Definition at line 49 of file HashTable.hpp.


Member Function Documentation

void se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::add HashTableNode *  element,
iterator_type firstNode
[inline, inherited]
 

Add member to a list.

The member will be added to the beginning of the list for efficiency reasons.

Parameters:
element the element to add
firstNode a reference to a variable containint the index of the first node in the list (or end() if it is a new or empty list)

Definition at line 74 of file SinglyLinkedList.hpp.

References AssertFatal, DebugExec, and LogDetail.

int se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::capacity  )  [inline, inherited]
 

Definition at line 297 of file SinglyLinkedList.hpp.

void se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::clear  )  [inline, inherited]
 

Remove all singly linked lists.

Removes all singly linked lists contained in the structure.

Definition at line 317 of file SinglyLinkedList.hpp.

se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::DebugExec int  count_  )  [protected, inherited]
 

const iterator_type se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::end  )  [inline, static, inherited]
 

Returns the value that terminates the loop.

Definition at line 273 of file SinglyLinkedList.hpp.

bool se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::hasElement HashTableNode *  element,
iterator_type firstNode
[inline, inherited]
 

Check if an element exists in a singly linked list.

Parameters:
element element to look for
firstNode a reference to a variable containing the index of the first node in the list (or end() if it is a new or empty list)

Definition at line 228 of file SinglyLinkedList.hpp.

bool se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::isFree const iterator_type it  )  [inline, inherited]
 

Definition at line 301 of file SinglyLinkedList.hpp.

HashTableNode * se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::next iterator_type iterator  )  [inline, inherited]
 

Iterate to the next member of a singly linked list The iterator is a iterator_type value that should initially have the index of the first node in the list as its value.

Each time this method is called, the iterator is changed to point to the next member.

Parameters:
iterator a reference to a variable pointing to the current member in the list. After the call it will contain the index of the next member, or end() if no more members exist.

Definition at line 253 of file SinglyLinkedList.hpp.

References DbgAssert.

HashTableNode * se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::pop iterator_type iterator  )  [inline, inherited]
 

Remove and return topmost element in list.

Definition at line 132 of file SinglyLinkedList.hpp.

References AssertFatal, and DebugExec.

bool se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::remove HashTableNode *  element,
iterator_type firstNode
[inline, inherited]
 

Remove an element from the list.

Will only remove the element from the list once. If the member may exist in the list multiple times, the method must be called once for each instance to remove.

Parameters:
element The elemnt to remove
firstNode a reference to a variable containint the index of the first node in the list (or end() if it is a new or empty list)

Definition at line 162 of file SinglyLinkedList.hpp.

References DebugExec, and LogDetail.

HashTableNode * se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::remove iterator_type iterator,
const iterator_type previousElement
[inline, inherited]
 

Remove a member from the the list.

: This should be protected.

Definition at line 105 of file SinglyLinkedList.hpp.

References Assert, DebugExec, and LogDetail.

void se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::removeChain iterator_type firstNode  )  [inline, inherited]
 

Remove the chain Remove all members from the singly linked list.

Parameters:
firstNode a reference to a variable containint the index of the first node in the list (or end() if it is a new or empty list)

Definition at line 199 of file SinglyLinkedList.hpp.

int se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::size const iterator_type firstNode  )  [inline, inherited]
 

The number of members in a list.

Parameters:
firstNode a reference to a variable containing the index of the first node in the list (or end() if it is a new or empty list)
Returns:
the number of members

Definition at line 285 of file SinglyLinkedList.hpp.


Member Data Documentation

const char* se_core::SinglyLinkedList< HashTableNode , maxElements, xid >::name_ [protected, inherited]
 

The name of this container instance (included to ease debugging).

Definition at line 363 of file SinglyLinkedList.hpp.


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

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:30 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo