-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.h
72 lines (62 loc) · 2.14 KB
/
User.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
//
// Created by Elestrias on 07.03.2021.
//
#ifndef UNTITLED4_USER_H
#define UNTITLED4_USER_H
#include "Room.h"
#include <vector>
#include "AccessType.h"
#include "dependencies.h"
using namespace std;
class User {
protected:
pair<string, string> initials;
AccessType access;
string lovedJoke;
vector<pair<AccessType, string>> adminGarants;
string login;
string password;
string UserType;
string personalCabinet="No Cabinet";
public:
User(const pair<string, string>& initials, const string &lovedJoke, const string log, const string pass);
User();
//~User();
virtual AccessType getAccess();
virtual pair<string, string> getInitials();
virtual pair<AccessType, bool> changeGlobalAccess(AccessType acc, AccessType newacc);
virtual bool changeRoomAccess(AccessType acc, Room *room);
virtual bool comeIn(Room &room);
static string toString(AccessType AT);
virtual string getUserType();
};
class Student: public User{
public:
Student(const pair<string, string> &initials, const string &lovedJoke, const string log, const string pass);
// ~Student();
};
class Professor: public User{
protected:
string PersonalRoom = "000";
public:
Professor(const pair<string, string> &initials, const string personalRoom, const string &lovedJoke, const string log, const string pass);
Professor();
//~Professor();
string getCabinet() override;
void setCabinet(Room &room);
};
class LabStuff: public User{
public:
LabStuff(const pair<string, string> &initials, const string &lovedJoke, const string log, const string pass);
};
class Director: public Professor{
public:
Director(const pair<string, string> &initials, const string &personalRoom, const string &lovedJoke, const string log, const string pass);
};
class Admin: public Professor{
public:
Admin(const pair<string, string> &initials, const string &personalRoom, const string &lovedJoke, const string log, const string pass);
void giveGarant(User user, Room *room);
void updateAccessRoots(User user, AccessType newacc);
};
#endif //UNTITLED4_USER_H