DWFCore::DWFWCharKeyHashList< T, H > Class Template Reference

#include "dwfcore/SkipList.h"

Inheritance diagram for DWFCore::DWFWCharKeyHashList< T, H >:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFWCharKeyHashList< T, H >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
class DWFCore::DWFWCharKeyHashList< T, H >

A skip list based collection with hashed const wchar_t* string keys.

Since:
1.0.1
This collection uses a skip list with 32-bit keys to store it's elements. These keys are computed from the string keys using the hash function provided in the definition.
Warning:
No element chaining is performed so it is mathematically possible that duplicate hash values could be computed from different string keys.
Parameters:
T The list type.
H The hashing function (must provide 32-bit keys) tDWFFNV1A32HashKernel is used by default.

Definition at line 1864 of file SkipList.h.

Public Member Functions

 DWFWCharKeyHashList () throw ()
virtual ~DWFWCharKeyHashList () throw ()
virtual void clear () throw ()
virtual size_t size () const throw ()
virtual Iteratoriterator () throw ()
virtual ConstIteratorconstIterator () const throw ()
virtual Iteratoriterator (const wchar_t *&rKey) throw ()
virtual ConstIteratorconstIterator (const wchar_t *&rKey) const throw ()
virtual T * find (const wchar_t *&rKey) const throw ()
virtual bool erase (const wchar_t *&rKey) throw ()
virtual bool insert (const wchar_t *&rKey, const T &rValue, bool bReplace=true) throw ( DWFException )

Classes

class  ConstIterator
 An implementation of the const iterator for this hash list. More...
class  Iterator
 An implementation of the iterator for this hash list. More...


Constructor & Destructor Documentation

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
DWFCore::DWFWCharKeyHashList< T, H >::DWFWCharKeyHashList  )  throw () [inline]
 

Constructor

Exceptions:
None 

Definition at line 2005 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual DWFCore::DWFWCharKeyHashList< T, H >::~DWFWCharKeyHashList  )  throw () [inline, virtual]
 

Destructor

Exceptions:
None 

Definition at line 2014 of file SkipList.h.


Member Function Documentation

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual void DWFCore::DWFWCharKeyHashList< T, H >::clear  )  throw () [inline, virtual]
 

Empties the list and restores the initial state.

Exceptions:
DWFMemoryException 

Definition at line 2021 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual ConstIterator* DWFCore::DWFWCharKeyHashList< T, H >::constIterator const wchar_t *&  rKey  )  const throw () [inline, virtual]
 

Definition at line 2069 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual ConstIterator* DWFCore::DWFWCharKeyHashList< T, H >::constIterator  )  const throw () [inline, virtual]
 

Returns a const iterator from the first element in the list. The caller owns the iterator and is responsible for releasing it with the DWFCORE_FREE_OBJECT macro.

Returns:
A pointer to a new list iterator.
Exceptions:
None 
Since:
1.2

Definition at line 2051 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual bool DWFCore::DWFWCharKeyHashList< T, H >::erase const wchar_t *&  rKey  )  throw () [inline, virtual]
 

Removes an element from the list.

Parameters:
rKey The key of the element to erase.
Returns:
true if keyed element was erased, false if the element was not found.
Exceptions:
None 

Definition at line 2087 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual T* DWFCore::DWFWCharKeyHashList< T, H >::find const wchar_t *&  rKey  )  const throw () [inline, virtual]
 

Search the list with a given key and return the associated value if it exists.

Parameters:
rKey The key for which to search the list.
Returns:
A pointer to the value associated with the key or NULL if the key was not found.
Exceptions:
None 

Definition at line 2078 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual bool DWFCore::DWFWCharKeyHashList< T, H >::insert const wchar_t *&  rKey,
const T &  rValue,
bool  bReplace = true
throw ( DWFException ) [inline, virtual]
 

Adds an element to the list.

Parameters:
rKey The key of the element to add.
rValue The value of the element to add.
bReplace If the new element uses a key that already exists, this flag determines whether or not the new element will be inserted and replace the previous element or ignored.
Returns:
false the the element key is a duplicate, true otherwise.
Exceptions:
DWFException 

Definition at line 2096 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual Iterator* DWFCore::DWFWCharKeyHashList< T, H >::iterator const wchar_t *&  rKey  )  throw () [inline, virtual]
 

Returns an iterator from the keyed element in the list. The caller owns the iterator and is responsible for releasing it with the DWFCORE_FREE_OBJECT macro.

Parameters:
rKey The key of the first list element from which to start the iterator.
Returns:
A pointer to a new list iterator.
Exceptions:
None 

Definition at line 2060 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual Iterator* DWFCore::DWFWCharKeyHashList< T, H >::iterator  )  throw () [inline, virtual]
 

Returns an iterator from the first element in the list. The caller owns the iterator and is responsible for releasing it with the DWFCORE_FREE_OBJECT macro.

Returns:
A pointer to a new list iterator.
Exceptions:
None 

Definition at line 2042 of file SkipList.h.

template<class T, class H = tDWFFNV1A32HashKernel<const wchar_t>>
virtual size_t DWFCore::DWFWCharKeyHashList< T, H >::size  )  const throw () [inline, virtual]
 

Returns the number of elements stored in the list.

Returns:
The number of list elements.
Exceptions:
None 

Definition at line 2033 of file SkipList.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:40 2009 for Autodesk DWF Core Library by  doxygen 1.4.5