-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAREA.HPP
105 lines (74 loc) · 2.03 KB
/
AREA.HPP
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
class Area
{
static int selected_start;
static int selected_end;
public:
virtual ~Area() {}
virtual bool read(int) = 0;
virtual bool write(int) = 0;
virtual bool clear(int) = 0;
virtual bool insert(int) = 0;
virtual bool remove(int) = 0;
virtual int numAreas() = 0;
virtual KEY edit() = 0;
virtual int selStart(int i = -20000)
{
if(i != -20000)
selected_start = i;
return selected_start;
}
virtual int selEnd (int i = -20000)
{
if(i != -20000)
selected_end = i;
return selected_end;
}
virtual void listFunc(int,int,int) = 0;
virtual dword crc() = 0;
virtual bool sort(int,int) = 0;
virtual bool move(int,int,int) = 0;
};
class MsgArea : public _MsgArea , public Area
{
static File f;
static DynamicArrayFile<_MsgArea> *df;
static int file_count;
static _MsgArea fEmpty(long);
static void fMove(long,long,_MsgArea&);
public:
MsgArea();
~MsgArea();
bool read(int);
bool write(int);
bool clear(int);
bool insert(int);
bool remove(int);
int numAreas();
KEY edit();
void listFunc(int,int x,int y);
dword crc();
bool sort(int,int);
bool move(int,int,int);
};
class FileArea : public _FileArea , public Area
{
static File f;
static DynamicArrayFile<_FileArea> *df;
static int file_count;
static _FileArea fEmpty(long);
int areaNum;
public:
FileArea();
~FileArea();
bool read(int);
bool write(int);
bool clear(int);
bool insert(int);
bool remove(int);
int numAreas();
KEY edit();
void listFunc(int,int x,int y);
dword crc();
bool sort(int,int);
bool move(int,int,int);
};