101 lines
1.9 KiB
C++
Executable file
101 lines
1.9 KiB
C++
Executable file
#include <fstream>
|
|
#include <iostream>
|
|
#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);
|
|
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();
|
|
};
|
|
|