-
Notifications
You must be signed in to change notification settings - Fork 0
/
LinkedList.cpp
59 lines (50 loc) · 1.04 KB
/
LinkedList.cpp
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
#include "videoStore.h"
videoStore::videoStore() {
v_Head = new Node;
m_Head = new Node;
z_Head = new Node;
Init_list(m_Head);
Init_list(v_Head);
z_head_init(z_Head);
File_log(1);
File_Video_Load();
File_Member_Load();
}
void videoStore::m_count_increase() { m_Count++; }
void videoStore::v_count_increase() { v_Count++; }
void videoStore::m_count_decrease() { m_Count--; }
void videoStore::v_count_decrease() { v_Count--; }
void
videoStore::z_head_init(Node* phead) {
phead->Llink = phead;
phead->Rlink = phead;
for (int i = 0; i < 4; i++) {
phead->v_Data.v_Video_Id[i] = 0;
}
}
void
videoStore::Init_list(Node* phead) {
phead->Llink = phead;
phead->Rlink = phead;
}
bool
videoStore::empty(int a) {
switch (a) {
case 1: {
if (v_Count == 0) return true;
return false;
break;
}
case 2: {
if (m_Count == 0) return true;
return false;
break;
}
}
}
videoStore::~videoStore() {
File_Member_Save();
File_Video_Save();
delete v_Head, m_Head, z_Head;
File_log(0);
}