Initial Commit

This commit is contained in:
2024-08-07 09:09:36 -04:00
commit ca445435a0
458 changed files with 41370 additions and 0 deletions

37
common/QSORT.HPP Normal file
View File

@@ -0,0 +1,37 @@
#ifndef _COMMON_QUICKSORT_HPP_
#define _COMMON_QUICKSORT_HPP_
#ifndef _COMMON_SORTOPTIONS_HPP_
#include <common/sortopt.hpp>
#endif
#ifndef _COMMON_TYPES_HPP_
#include <common/types.hpp>
#endif
#ifdef _EXPAND_QSORT_TEMPLATES_
#pragma option -Jgd
#endif
template <class T>
class Block;
template <class T>
class Array;
template <class T>
class QuickSort
{
public:
QuickSort(void);
virtual ~QuickSort();
void sortItems(Array<T> &arrayItems,SortOptions::SortOrder sortOrder=SortOptions::Ascending);
void sortItems(Block<T> &someBlock,SortOptions::SortOrder sortOrder=SortOptions::Ascending);
private:
void quickSort(long left,long right);
void quickSortDescending(long left,long right);
void sortBlockAscending(long left,long right);
void sortBlockDescending(long left,long right);
Block<T> *mlpBlockItems;
T HUGE *mlpItemList;
};
#if defined(_MSC_VER)
#include <common/qsort.tpp>
#endif
#endif