-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloadingfunction.hpp
More file actions
55 lines (48 loc) · 988 Bytes
/
loadingfunction.hpp
File metadata and controls
55 lines (48 loc) · 988 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef LOADINGFUNCTION_HPP
#define LOADINGFUNCTION_HPP
#include "mappanel.hpp"
#include <wx/wx.h>
class LoadingFrame;
class LoadingFunction;
/*
class LoadingTimer : public wxTimer {
public:
LoadingTimer(LoadingFunction* func);
void Notify();
private:
LoadingFunction* func;
};
*/
class LoadingFunction{
friend class LoadingTimer;
public:
void handle();
unsigned int getTokens();
bool isFinished();
bool isReady();
LoadingFunction();
~LoadingFunction();
protected:
void returnTokens(unsigned int number);
virtual void onTimer() = 0;
unsigned int tokens;
LoadingFrame* parent;
//LoadingTimer next;
bool finished;
bool ready;
};
class TimeWait : public LoadingFunction {
public:
TimeWait(LoadingFrame* parent, unsigned int secs);
private:
void onTimer();
};
class MapCreator : public LoadingFunction {
public:
MapCreator(LoadingFrame* parent, MapPanel* panel);
//void handle();
private:
MapPanel* panel;
void onTimer();
};
#endif