Sorter< T > Class Template Reference

Sorting abstract class. More...

#include <sort.h>

List of all members.

Public Member Functions

 Sorter ()
 The constructor.
virtual ~Sorter ()
 The destructor.
virtual int Sort (T *_array, size_t _size)=0
 The abstract sort function.
virtual void Swap (T *_array, size_t _first, size_t _second)
 The swap function.


Detailed Description

template<class T>
class CrissCross::Data::Sorter< T >

Sorting abstract class.

Member Function Documentation

virtual int Sort ( T *  _array,
size_t  _size 
) [pure virtual]

The abstract sort function.

Does nothing, and cannot be called (abstract).

Parameters:
_array The array to sort.
_size The size of the array to sort.

Implemented in BubbleSort< T >, CombSort< T >, HeapSort< T >, InsertionSort< T >, QuickSort< T >, and ShellSort< T >.

virtual void Swap ( T *  _array,
size_t  _first,
size_t  _second 
) [inline, virtual]

The swap function.

Will swap two items in an array.

Parameters:
_array The array to swap items in.
_first The first item to swap.
_second The second item to swap.


Generated on Sun Feb 8 11:10:00 2009 for CrissCross by  doxygen 1.5.8