-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassList.h
50 lines (49 loc) · 1.07 KB
/
classList.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
#ifndef CLASSLIST_H
#define CLASSLIST_H
#include<QString>
#include<QVector>
#include<QFile>
#include<QTextStream>
#include<QDebug>
class classNode{
public:
QString name;
QString teacherRes;
int left;
int stuNum;
QVector<QString>selected;
classNode*next;
classNode(classNode*& cla)
{
name=cla->name;
teacherRes=cla->teacherRes;
left=cla->left;
stuNum=cla->stuNum;
selected=cla->selected;
next=cla->next;
}
classNode(QString Name,QString TeacherRes,int Left,int StuNum,QVector<QString> Selected)
{
name=Name;
teacherRes=TeacherRes;
left=Left;
stuNum=StuNum;
selected=Selected;
next=NULL;
}
};
class classList
{
public:
void initList();
void insertNode(classNode*&);
void deleteNode(classNode*&);
classNode*& findClass(QString&);
int addStudent(QString&,QString&);
void deleteStudent(QString&,QString&);
void traverseClass();
void save();
classNode*classes=NULL;
classNode*tmpPtr=NULL;
};
#endif // CLASSLIST_H