VDKHeap< T > Class Template Reference

provide a templatized Heap More...

#include <vdkheap.h>

Inheritance diagram for VDKHeap< T >:

VDKContainer< T >

List of all members.

Public Member Functions


Detailed Description

template<class T>
class VDKHeap< T >

provide a templatized Heap

Description
VDKHeap<T> class has a value semantic, all objects are copied from original values. All managed type T objects should provide:
  • a default constructor: T::T()
  • a copy initializer: T::T(T& t)
  • an assignement operator: T& T::operator=(T& t)
  • an equality and less-than operators:
  • bool T::operator==(T& t)
  • bool T::operator<(T& t)
Implementation notes
I suggest to use typedef's like:
  typedef VDKHeap<someClass> SomeClassHeap;

Constructor & Destructor Documentation

template<class T>
VDKHeap< T >::VDKHeap (  )  [inline]

Constructor makes an empty heap

template<class T>
VDKHeap< T >::VDKHeap ( T *  source,
int  size 
) [inline]

Constructor

Parameters:
source an array of type T obejcts
array size

template<class T>
virtual VDKHeap< T >::~VDKHeap (  )  [inline, virtual]

Destructor


Member Function Documentation

template<class T>
void VDKHeap< T >::Sort ( void   )  [inline]

Sorts on nlog(n) time


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

Generated on Tue May 6 03:40:10 2008 for vdk 2.4.0 by  doxygen 1.5.5