-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSortStringArray.h
More file actions
33 lines (24 loc) · 984 Bytes
/
Copy pathSortStringArray.h
File metadata and controls
33 lines (24 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SortStringArray.h: Schnittstelle für die Klasse CSortStringArray.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SORTSTRINGARRAY_H__64C6B322_B44E_11D2_955E_204C4F4F5020__INCLUDED_)
#define AFX_SORTSTRINGARRAY_H__64C6B322_B44E_11D2_955E_204C4F4F5020__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CSortStringArray : public CStringArray
{
public:
void Sort(BOOL bCase = FALSE);
void BubbleSort(BOOL bCase = FALSE);
void QuickSort(BOOL bCase = FALSE);
private:
void BubbleSortInner(INT nLeft, INT nRight);
void BubbleSortInnerNoCase(INT nLeft, INT nRight);
void QuickSortInner(INT nLeft, INT nRight);
void QuickSortInnerNoCase(INT nLeft, INT nRight);
BOOL CompareAndSwap(INT nPos);
BOOL CompareAndSwapNoCase(INT nPos);
void SwapElements(INT nPos1, INT nPos2);
};
#endif // !defined(AFX_SORTSTRINGARRAY_H__64C6B322_B44E_11D2_955E_204C4F4F5020__INCLUDED_)