-
Notifications
You must be signed in to change notification settings - Fork 0
/
Post.h
46 lines (38 loc) · 817 Bytes
/
Post.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
#ifndef _POST_H_
#define _POST_H_
#include <iostream>
#include <ostream>
#include <string>
#include <vector>
#include "Model.h"
#include "Date.h"
using namespace std;
class Post : public Model {
friend ostream &operator<<(ostream &, Post &);
public:
const Post &operator=(const Post &);
bool operator==(const Post &) const;
bool operator!=(const Post &right) const;
Post();
Post(unsigned int);
Post(const string &, int);
Post(const Post &);
~Post();
static bool has(int);
bool save();
bool remove();
bool update();
string getTitle();
void setTitle(const string &);
bool isPublished();
void publish();
const string resource();
private:
string title;
Date* published;
Date* modified;
int revisionCount;
string *revisions;
const static string RESOURCE;
};
#endif