Listing 8: Interface for class PolySort
/*
* psort.h
*/
#if !defined __POLYSORT_H
#define __POLYSORT_H
#include <new.h> //new_handler
#include <limits.h>
#include "mlist.h"
class PolySort {
MergeList *Mp;
MergeFile *Src, *Targ;
InternalSort *Ins;
PreSort *Ps;
new_handler _old_handler;
const size_t _width;
int _next_call;
PolySort( const PolySort& );
PolySort& operator= (const PolySort&);
protected:
int _distribute_runs();
void _merge_runs(int);
public:
PolySort( InternalSort&, int nfiles = 5,
size_t buflen = UINT_MAX);
~PolySort();
void Sort( ffstream *input, const char *output );
};
#endif
// End of File