forked from Jwoodbury/Room8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Group.cpp
50 lines (42 loc) · 791 Bytes
/
Group.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
#include "Room8.cpp"
#include "LinkedList.cpp"
class Group {
bool invite;
Group::Group() {
name = "Group 1";
this->size = 1;
admin = true;
invite = false;
Member creator = new Member();
LinkedList memberList = new LinkedList();
}
void Group::setGroupSize(int _size) {
this->size = _size;
}
int Group::getGroupSize() {
return size;
}
string Group::getGroupName() {
return name;
}
bool Group::getAdmin() {
return admin;
}
void Group::addMember(const string _name) {
memberList.add(_name);
}
void removeMember(const string _name) {
memberList.remove(_name);
}
void setPrivacy(Member member) {
if (member.admin() == true) {
if (invite == false) {
invite = true;
} else {
invite = false;
}
} else {
//insert popup.
}
}
}