DWFCore::DWFSortedList< T, E, L, Z > Class Template Reference

#include "dwfcore/SkipList.h"

Inheritance diagram for DWFCore::DWFSortedList< T, E, L, Z >:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFSortedList< T, E, L, Z >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
class DWFCore::DWFSortedList< T, E, L, Z >

A skip list based collection with ordered keys.

Since:
1.0.1
Parameters:
T The list type.
E Defines equality between two elements of type T.
L Defines ordering between two elements of type T.
Z Defines the empty or zero-value for elements of type T.

Definition at line 1294 of file SkipList.h.

Public Member Functions

 DWFSortedList () throw ()
virtual ~DWFSortedList () throw ()
virtual void clear () throw ()
virtual size_t size () const throw ()
virtual Iteratoriterator () throw ()
virtual ConstIteratorconstIterator () const throw ()
virtual Iteratoriterator (const T &rT) throw ()
virtual ConstIteratorconstIterator (const T &rT) const throw ()
virtual bool exists (const T &rT) const throw ()
virtual bool erase (const T &rT) throw ()
virtual bool insert (const T &rT, bool bReplace=true) throw ( DWFException )

Classes

class  ConstIterator
 An implementation of the const iterator for sorted lists. More...
class  Iterator
 An implementation of the iterator for sorted lists. More...


Constructor & Destructor Documentation

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
DWFCore::DWFSortedList< T, E, L, Z >::DWFSortedList  )  throw () [inline]
 

Constructor

Exceptions:
None 

Definition at line 1435 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual DWFCore::DWFSortedList< T, E, L, Z >::~DWFSortedList  )  throw () [inline, virtual]
 

Destructor

Exceptions:
None 

Definition at line 1444 of file SkipList.h.


Member Function Documentation

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual void DWFCore::DWFSortedList< T, E, L, Z >::clear  )  throw () [inline, virtual]
 

Empties the list and restores the initial state.

Exceptions:
DWFMemoryException 

Definition at line 1451 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual ConstIterator* DWFCore::DWFSortedList< T, E, L, Z >::constIterator const T &  rT  )  const throw () [inline, virtual]
 

Returns a const 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:
rT The element from which to start the iterator.
Returns:
A pointer to a new list iterator.
Exceptions:
None 
Since:
1.2

Definition at line 1509 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual ConstIterator* DWFCore::DWFSortedList< T, E, L, Z >::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 1478 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual bool DWFCore::DWFSortedList< T, E, L, Z >::erase const T &  rT  )  throw () [inline, virtual]
 

Removes an element from the list.

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

Definition at line 1535 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual bool DWFCore::DWFSortedList< T, E, L, Z >::exists const T &  rT  )  const throw () [inline, virtual]
 

Determine the existence of an element in the list.

Parameters:
rT The element to look up.
Returns:
true if the element exists in the list, false otherwise.
Exceptions:
None 

Definition at line 1522 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual bool DWFCore::DWFSortedList< T, E, L, Z >::insert const T &  rT,
bool  bReplace = true
throw ( DWFException ) [inline, virtual]
 

Adds an element to the list.

Parameters:
rT The element to add.
bReplace If the new element already exists in the list, this flag determines whether or not the it will be inserted and replace the previous element or ignored.
Returns:
false the the element is a duplicate, true otherwise.
Exceptions:
DWFException 

Definition at line 1551 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual Iterator* DWFCore::DWFSortedList< T, E, L, Z >::iterator const T &  rT  )  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:
rT The element from which to start the iterator.
Returns:
A pointer to a new list iterator.
Exceptions:
None 

Definition at line 1493 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual Iterator* DWFCore::DWFSortedList< T, E, L, Z >::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 1469 of file SkipList.h.

template<class T, class E = tDWFCompareEqual<T>, class L = tDWFCompareLess<T>, class Z = tDWFDefinedEmpty<T>>
virtual size_t DWFCore::DWFSortedList< T, E, L, Z >::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 1460 of file SkipList.h.


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