-
Notifications
You must be signed in to change notification settings - Fork 1
/
user.h
55 lines (48 loc) · 1.3 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
#ifndef USER_H
#define USER_H
#include "stdafx.h"
#include"newsmodel.h"
using namespace std;
enum class SearchBasedOn {
Keyword,
titles,
date,
notAdded
};
class User
{
private:
string firstname;
string lastname;
string username;
string password;
string region;
string email;
vector<NewsModel> _searchByKeywords(string);
vector<NewsModel> _searchByTitles(string);
vector<NewsModel> _searchByDate(string);
public:
static map<pair<int,string>,int>Rates;
User();
User( string username,string password, string region, string email);
User(string firstname,string lastname,string username,string password,string email);
String category ;
// double rate ;
vector<NewsModel> Search(SearchBasedOn searchBasedOn, string inp);
void ShowNewBasedOnCategory();
void RateNew(NewsModel news, double rate);
void Bookmark();
void ReadData();
void setUsername(string username);
void setPassword(string password);
void setRegion(string region);
void setEmail(string email);
string getFirstName();
string getLastName();
string getUsername();
string getPassword();
string getRegion();
string getEmail();
static void addUser(User);
};
#endif // USER_H