Update user.h
This commit is contained in:
parent
3c8228aa27
commit
70503cd23b
1 changed files with 94 additions and 37 deletions
131
user.h
131
user.h
|
@ -1,44 +1,101 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
// class User {
|
|
||||||
// string name;
|
|
||||||
// string password;
|
|
||||||
// string phone_number;
|
|
||||||
// string fax_number;
|
|
||||||
// string postal_address;
|
|
||||||
// vector<string> groups;
|
|
||||||
// vector<string> messages;
|
|
||||||
|
|
||||||
// bool is_admin;
|
|
||||||
// bool is_logged_in;
|
|
||||||
|
|
||||||
// public:
|
|
||||||
// User();
|
|
||||||
// User(string n, string pass, string phone, string fax, string postal, bool admin);
|
|
||||||
// string getName();
|
|
||||||
// string getPassword();
|
|
||||||
// string getPhoneNumber();
|
|
||||||
// string getFaxNumber();
|
|
||||||
// string getPostalAddress();
|
|
||||||
// vector<string> getGroups();
|
|
||||||
// vector<string> getMessages();
|
|
||||||
// bool confirmAdmin();
|
|
||||||
// bool checkLogin();
|
|
||||||
// void setName(string new_name);
|
|
||||||
// void setPassword(string new_name);
|
|
||||||
// void setPhone(string new_phone);
|
|
||||||
// void setFax(string new_fax);
|
|
||||||
// void setPostal(string new_postal);
|
|
||||||
// };
|
|
||||||
|
|
||||||
// class Message {
|
class User {
|
||||||
// string timestamp;
|
string name;
|
||||||
// string text;
|
string password;
|
||||||
|
string phone_number;
|
||||||
|
string fax_number;
|
||||||
|
string postal_address;
|
||||||
|
vector<string> groups;
|
||||||
|
vector<string> messages;
|
||||||
|
|
||||||
// public:
|
bool is_admin;
|
||||||
// Message();
|
bool is_logged_in;
|
||||||
// Message(string time, string t);
|
|
||||||
// };
|
public:
|
||||||
|
User();
|
||||||
|
User(string n, string pass, string phone, string fax, string postal, bool admin);
|
||||||
|
string getName();
|
||||||
|
string getPassword();
|
||||||
|
string getPhoneNumber();
|
||||||
|
string getFaxNumber();
|
||||||
|
string getPostalAddress();
|
||||||
|
vector<string> getGroups();
|
||||||
|
vector<string> getMessages();
|
||||||
|
bool confirmAdmin();
|
||||||
|
bool checkLogin();
|
||||||
|
void setName(string new_name);
|
||||||
|
void setPassword(string new_name);
|
||||||
|
void setPhone(string new_phone);
|
||||||
|
void setFax(string new_fax);
|
||||||
|
void setPostal(string new_postal);
|
||||||
|
vector<string> getInfo();
|
||||||
|
};
|
||||||
|
|
||||||
|
class Message {
|
||||||
|
string sender;
|
||||||
|
string receiver;
|
||||||
|
string timestamp;
|
||||||
|
string text;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Message();
|
||||||
|
Message(string time, string t, string s, string r);
|
||||||
|
string getSender();
|
||||||
|
string getReceiver();
|
||||||
|
string getTimestamp();
|
||||||
|
string getText();
|
||||||
|
void changeText(string input);
|
||||||
|
vector<string> getInfo();
|
||||||
|
};
|
||||||
|
|
||||||
|
class Board {
|
||||||
|
string name;
|
||||||
|
string description;
|
||||||
|
bool lockedForGroup;
|
||||||
|
string group;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Board();
|
||||||
|
Board(string n, string d);
|
||||||
|
Board(string n, string d, bool l, string g);
|
||||||
|
string getName();
|
||||||
|
string getDescription();
|
||||||
|
bool checkIfLocked();
|
||||||
|
string getGroup();
|
||||||
|
vector<string> getInfo();
|
||||||
|
};
|
||||||
|
|
||||||
|
class Group {
|
||||||
|
string name;
|
||||||
|
string description;
|
||||||
|
vector<Board> boards;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Group();
|
||||||
|
Group(string n, string d);
|
||||||
|
string getName();
|
||||||
|
string getDescription();
|
||||||
|
vector<Board> getBoards();
|
||||||
|
void addBoard(Board input);
|
||||||
|
vector<string> getInfo();
|
||||||
|
};
|
||||||
|
|
||||||
|
class Article {
|
||||||
|
string author;
|
||||||
|
string timestamp;
|
||||||
|
int length;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Article();
|
||||||
|
Article(string a, string t, int l);
|
||||||
|
string getAuthor();
|
||||||
|
string getTimestamp();
|
||||||
|
string getLength();
|
||||||
|
vector<string> getInfo();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue