yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
Update.cc
Go to the documentation of this file.
1 #include <optional>
2 #include "types/Update.h"
3 
4 using namespace yatbcpp;
5 using namespace std;
6 
8 // Constructor Section //
10 
11 Update::Update(int update_id):
12  update_id(update_id)
13 {
14 
15 }
16 
18  update_id(Update.update_id)
19 {
20  message = Update.message;
21  edited_message = Update.message;
22  channel_post = Update.channel_post;
24  inlineQuery = Update.inlineQuery;
25 }
26 
27 
29 // Setter Section //
31 
32 void Update::setMessage(const optional<Message> &message) {
34 }
35 
36 void Update::setEdited_message(const optional<Message> &edited_message) {
38 }
39 
40 void Update::setChannel_post(const optional<Message> &channel_post) {
42 }
43 
44 void Update::setEdited_channel_post(const optional<Message> &edited_channel_post) {
46 }
47 
48 void Update::setInlineQuery(const optional<InlineQuery> &inlineQuery) {
50 }
51 
53 // Getter Section //
55 
56 int Update::getUpdate_id() const {
57  return update_id;
58 }
59 
60 const optional<Message> &Update::getMessage() const {
61  return message;
62 }
63 
64 const optional<Message> &Update::getEdited_message() const {
65  return edited_message;
66 }
67 
68 const optional<Message> &Update::getChannel_post() const {
69  return channel_post;
70 }
71 
72 const optional<Message> &Update::getEdited_channel_post() const {
73  return edited_channel_post;
74 }
75 
76 const optional<InlineQuery> &Update::getInlineQuery() const {
77  return inlineQuery;
78 }
std::optional< Message > edited_message
Definition: Update.h:47
std::int32_t getUpdate_id() const
Definition: Update.cc:56
const std::optional< Message > & getEdited_message() const
Definition: Update.cc:64
Update(std::int32_t update_id)
void setMessage(const std::optional< Message > &message)
Definition: Update.cc:32
void setEdited_message(const std::optional< Message > &edited_message)
Definition: Update.cc:36
std::int32_t update_id
Definition: Update.h:45
Definition: Bot.h:27
std::optional< Message > channel_post
Definition: Update.h:48
void setEdited_channel_post(const std::optional< Message > &edited_channel_post)
Definition: Update.cc:44
const std::optional< Message > & getMessage() const
Definition: Update.cc:60
const std::optional< InlineQuery > & getInlineQuery() const
Definition: Update.cc:76
const std::optional< Message > & getChannel_post() const
Definition: Update.cc:68
void setChannel_post(const std::optional< Message > &channel_post)
Definition: Update.cc:40
std::optional< Message > message
Definition: Update.h:46
const std::optional< Message > & getEdited_channel_post() const
Definition: Update.cc:72
std::optional< Message > edited_channel_post
Definition: Update.h:49
void setInlineQuery(const std::optional< InlineQuery > &inlineQuery)
Definition: Update.cc:48
std::optional< InlineQuery > inlineQuery
Definition: Update.h:50