-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPost.cpp
More file actions
67 lines (51 loc) · 826 Bytes
/
Copy pathPost.cpp
File metadata and controls
67 lines (51 loc) · 826 Bytes
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
#include "Post.h"
Post::Post()
{
}
void Post::set_post(QString t, QString c,QString i,QString n){
this->num=0;
this->is_top=0;
this->title=t;
this->content=c;
this->id=i;
this->user=n;
}
void Post::set_num(int i){
num=i;
}
void Post::set_top(){
is_top=1;
}
void Post::set_notop(){
is_top=0;
}
QString Post::get_title(){
return title;
}
QString Post::get_name(){
return user;
}
QString Post::get_content(){
return this->content;
}
void Post::Like(){
this->num++;
}
int Post::get_num(){
return num;
}
int Post::get_top(){
return is_top;
}
vector <Comment *> Post::get_comment(){
return C;
}
void Post::set_comment(vector<Comment *> s){
C=s;
}
QString Post::get_id(){
return id;
}
void Post::add(Comment * a){
this->C.push_back(a);
}