-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrappers.h
78 lines (60 loc) · 1.5 KB
/
wrappers.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// Created by pawciow on 20.03.18.
//
#ifndef PROJEKT_1_WRAPPERS_H
#define PROJEKT_1_WRAPPERS_H
#include "constants.h"
#include "heapsort.h"
#include "Quicksort.h"
#include "MergeSort.h"
#include "hybridSort.h"
class Wrapper: public IRunable,
public IPreparable,
public IResults
{
protected:
// int dataSize;
int* copiedData;
long long int time = 0;
public:
// virtual void prepareRandom(int size);
virtual void run() = 0;
virtual void prepareSorted(int size) = 0;
virtual void prepareOppositeSorted(int size) = 0;
virtual void cpyData();
//virtual void harmonizeData(int* Done, int* toDo, int* toDo_2);
virtual void showData();
virtual int* getData();
virtual int getDataSize();
virtual int getTime();
};
class ExampleHeapsort : public Wrapper
{
public:
void run();
virtual void prepareSorted(int size);
virtual void prepareOppositeSorted(int size);
};
class ExampleQuicksort : public Wrapper
{
public:
void run();
virtual void prepareSorted(int size);
virtual void prepareOppositeSorted(int size);
};
class ExampleMergesort: public Wrapper
{
public:
void run();
virtual void prepareSorted(int size);
virtual void prepareOppositeSorted(int size);
};
class ExampleHybridsort: public Wrapper
{
public:
void run();
virtual void prepareSorted(int size);
virtual void prepareOppositeSorted(int size);
ExampleHybridsort& getInstance(){return *this;}
};
#endif //PROJEKT_1_WRAPPERS_H