diff options
Diffstat (limited to 'src/tweet.h')
-rw-r--r-- | src/tweet.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tweet.h b/src/tweet.h index 34a9cd7..387f73a 100644 --- a/src/tweet.h +++ b/src/tweet.h | |||
@@ -14,11 +14,18 @@ namespace twitter { | |||
14 | public: | 14 | public: |
15 | tweet(); | 15 | tweet(); |
16 | tweet(std::string data); | 16 | tweet(std::string data); |
17 | tweet(const tweet& other); | ||
18 | tweet(tweet&& other); | ||
19 | ~tweet(); | ||
20 | |||
21 | tweet& operator=(tweet other); | ||
22 | friend void swap(tweet& first, tweet& second); | ||
17 | 23 | ||
18 | tweet_id getID() const; | 24 | tweet_id getID() const; |
19 | std::string getText() const; | 25 | std::string getText() const; |
20 | const user& getAuthor() const; | 26 | const user& getAuthor() const; |
21 | bool isRetweet() const; | 27 | bool isRetweet() const; |
28 | tweet getRetweet() const; | ||
22 | std::vector<std::pair<user_id, std::string>> getMentions() const; | 29 | std::vector<std::pair<user_id, std::string>> getMentions() const; |
23 | 30 | ||
24 | operator bool() const; | 31 | operator bool() const; |
@@ -28,7 +35,8 @@ namespace twitter { | |||
28 | tweet_id _id; | 35 | tweet_id _id; |
29 | std::string _text; | 36 | std::string _text; |
30 | user _author; | 37 | user _author; |
31 | bool _retweeted; | 38 | bool _is_retweet = false; |
39 | tweet* _retweeted_status = nullptr; | ||
32 | std::vector<std::pair<user_id, std::string>> _mentions; | 40 | std::vector<std::pair<user_id, std::string>> _mentions; |
33 | }; | 41 | }; |
34 | 42 | ||