-
Notifications
You must be signed in to change notification settings - Fork 0
/
Teacher.h
107 lines (80 loc) · 1.89 KB
/
Teacher.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
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
106
107
/**
*
* Teacher.h : Class to hold Teacher information, including name, ID,
* And the teacher's classes.
*
*
* @author Nikko Schaff
*/
#include "stdafx.h"
#ifndef TEACHER_H_
#define TEACHER_H_
// Local header includes
#include "Class.h"
#include "GradeSnap.h"
#include "sqlite3.h"
// System header includes
#include <string>
#include <map>
class Teacher {
public:
/**
* Constructor for the Teacher
*
* @param name The name of the teacher
*
*/
Teacher( std::map< std::string, std::string > data, int id = -1 );
/**
* Constructor for the Teacher
*
* @param name The name of the teacher
* @param classes The map of classes to be added
*
*/
Teacher( std::map< std::string, std::string > data,
std::map< int, Class > newClasses, int id = -1 );
/**
* Destructor for the teacher
*/
~Teacher();
// Declaration of the DataInterface method dbRead
void dbRead( int id );
// Declaration of the DataInterface method dbWrite
void dbWrite( int id ) ;
// Declaration of the DataInterface method dbIdInside
bool dbIdInside( int id );
// Declaration of the DataInterface method putFieldValue
void putFieldValue( std::string key, std::string value );
// Declaration of the DataInterface method getFieldValue
std::string getFieldValue( std::string key );
/**
* Puts a class into the classes map
*
* @param classID Class ID
* @param class Class to be added
*/
void putClass( int classID, Class theClass );
/**
* Gets a class from the list based on ID
*
* @param classID The ID of the class
*/
Class getClass( int classID );
/**
* Getter for the Teacher ID
*
* @return int Teacher ID
*/
int getID();
private:
// Teacher's ID - for internal system use
int ID;
// Map of data fields
std::map< std::string, std::string > dataFields;
// Map of the teacher's classes
// key -> classID
// value -> Class
std::map< int, Class > classes;
};
#endif