DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ > Class Template Reference

#include "dwfcore/SkipList.h"

Inheritance diagram for DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
class DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >

A chained skip list allows for value types keyed in two dimensions where the first can be an aggregate and the second is unique.

Since:
1.0.1
Parameters:
PK The primary (list) key type.
SK The secondary (chains) key type.
V The value type.
PE Defines equality between two primary keys.
SE Defines equality between two secondary keys.
PL Defines ordering between two primary keys.
SL Defines ordering between two secondary keys.
PZ Defines the empty or zero-value for the primary key type.
SZ Defines the empty or zero-value for the secondary key type.

Definition at line 2137 of file SkipList.h.

Public Member Functions

 DWFChainedSkipList () throw ()
virtual ~DWFChainedSkipList () throw ()
virtual void clear () throw ()
virtual size_t size () const throw ()
virtual size_t size (const PK &rPKey) const throw ()
virtual Iteratoriterator () throw ()
virtual ConstIteratorconstIterator () const throw ()
virtual Iteratoriterator (const PK &rPKey) throw ()
virtual ConstIteratorconstIterator (const PK &rPKey) const throw ()
virtual Iteratoriterator (const PK &rPKey, const SK &rSKey) throw ()
virtual ConstIteratorconstIterator (const PK &rPKey, const SK &rSKey) const throw ()
virtual V * find (const PK &rPKey, const SK &rSKey) const throw ()
virtual bool erase (const PK &rPKey) throw ()
virtual bool erase (const PK &rPKey, const SK &rSKey) throw ()
virtual bool insert (const PK &rPKey, const SK &rSKey, const V &rValue, bool bReplace=true) throw ( DWFException )

Classes

class  ConstIterator
 An implementation of a skip list const iterator for chained lists. More...
class  Iterator
 An implementation of a skip list iterator for chained lists. More...


Constructor & Destructor Documentation

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::DWFChainedSkipList  )  throw () [inline]
 

Constructor

Exceptions:
None 

Definition at line 2543 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::~DWFChainedSkipList  )  throw () [inline, virtual]
 

Destructor

Exceptions:
None 

Definition at line 2552 of file SkipList.h.


Member Function Documentation

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual void DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::clear  )  throw () [inline, virtual]
 

Empties the list and restores the initial state.

Exceptions:
DWFMemoryException 

Definition at line 2571 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual ConstIterator* DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::constIterator const PK &  rPKey,
const SK &  rSKey
const throw () [inline, virtual]
 

Returns a const iterator from the keyed element in the list. The iterator will begin at the element keyed by rSKey of the chain keyed by rPKey. The caller owns the iterator and is responsible for releasing it with the DWFCORE_FREE_OBJECT macro.

Parameters:
rPKey The key of the first chain list from which to start the iterator.
rSKey The key of the first list element in the chain from which to start the iterator.
Returns:
A pointer to a new list iterator.
Exceptions:
None 
Since:
1.2

Definition at line 2730 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual ConstIterator* DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::constIterator const PK &  rPKey  )  const throw () [inline, virtual]
 

Returns a const iterator from the keyed element in the list. The iterator will begin at the first element of the chain keyed by rPKey. The caller owns the iterator and is responsible for releasing it with the DWFCORE_FREE_OBJECT macro.

Parameters:
rPKey The key of the first chain list from which to start the iterator.
Returns:
A pointer to a new list iterator.
Exceptions:
None 
Since:
1.2

Definition at line 2689 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual ConstIterator* DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::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 2645 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual bool DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::erase const PK &  rPKey,
const SK &  rSKey
throw () [inline, virtual]
 

Removes an element from the list.

Parameters:
rPKey The key of the chain list to search.
rSKey The key of the element in the chain list to remove.
Returns:
true if keyed element was erased, false if the element was not found.
Exceptions:
None 

Definition at line 2787 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual bool DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::erase const PK &  rPKey  )  throw () [inline, virtual]
 

Removes chain list from the list.

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

Definition at line 2761 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual V* DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::find const PK &  rPKey,
const SK &  rSKey
const throw () [inline, virtual]
 

Search a keyed chain list with a given [secondary] key and return the associated value if it exists.

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

Definition at line 2746 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual bool DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::insert const PK &  rPKey,
const SK &  rSKey,
const V &  rValue,
bool  bReplace = true
throw ( DWFException ) [inline, virtual]
 

Adds an element to the list.

Parameters:
rPKey The key of the chain list into which the element will be added.
rSKey The key of the element in the chain list.
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 2808 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual Iterator* DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::iterator const PK &  rPKey,
const SK &  rSKey
throw () [inline, virtual]
 

Returns an iterator from the keyed element in the list. The iterator will begin at the element keyed by rSKey of the chain keyed by rPKey. The caller owns the iterator and is responsible for releasing it with the DWFCORE_FREE_OBJECT macro.

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

Definition at line 2709 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual Iterator* DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::iterator const PK &  rPKey  )  throw () [inline, virtual]
 

Returns an iterator from the keyed element in the list. The iterator will begin at the first element of the chain keyed by rPKey. The caller owns the iterator and is responsible for releasing it with the DWFCORE_FREE_OBJECT macro.

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

Definition at line 2669 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual Iterator* DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::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 2629 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual size_t DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::size const PK &  rPKey  )  const throw () [inline, virtual]
 

Returns the number of elements stored in one chained list.

Returns:
The number of list elements.
Exceptions:
None 

Definition at line 2618 of file SkipList.h.

template<class PK, class SK, class V, class PE = tDWFCompareEqual<PK>, class SE = tDWFCompareEqual<SK>, class PL = tDWFCompareLess<PK>, class SL = tDWFCompareLess<SK>, class PZ = tDWFDefinedEmpty<PK>, class SZ = tDWFDefinedEmpty<SK>>
virtual size_t DWFCore::DWFChainedSkipList< PK, SK, V, PE, SE, PL, SL, PZ, SZ >::size  )  const throw () [inline, virtual]
 

Returns the number of elements stored in the list. This count is the sum of all chained lists counts.

Returns:
The number of list elements.
Exceptions:
None 

Definition at line 2594 of file SkipList.h.


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