yatbcpp
0.0.1
Yet another Telegram Bot CPP Library
src
types
KeyboardButton.cc
Go to the documentation of this file.
1
#include <string>
2
#include <optional>
3
#include "
types/KeyboardButton.h
"
4
5
using namespace
yatbcpp
;
6
using namespace
std
;
7
9
// Constructor Section //
11
12
KeyboardButton::KeyboardButton
(std::string text):
13
text(text)
14
{
15
16
}
17
18
KeyboardButton::KeyboardButton
(
const
KeyboardButton
&
KeyboardButton
):
19
text
(KeyboardButton.
text
)
20
{
21
request_contact
= KeyboardButton.
request_contact
;
22
request_location
= KeyboardButton.
request_location
;
23
}
24
25
27
// Setter Section //
29
30
void
KeyboardButton::setRequest_contact
(
const
optional<bool> &
request_contact
) {
31
KeyboardButton::request_contact
=
request_contact
;
32
}
33
34
void
KeyboardButton::setRequest_location
(
const
optional<bool> &
request_location
) {
35
KeyboardButton::request_location
=
request_location
;
36
}
37
39
// Getter Section //
41
42
const
string
&
KeyboardButton::getText
()
const
{
43
return
text
;
44
}
45
46
const
optional<bool> &
KeyboardButton::getRequest_contact
()
const
{
47
return
request_contact
;
48
}
49
50
const
optional<bool> &
KeyboardButton::getRequest_location
()
const
{
51
return
request_location
;
52
}
yatbcpp::KeyboardButton::request_contact
std::optional< bool > request_contact
Definition:
KeyboardButton.h:28
yatbcpp::KeyboardButton
Definition:
KeyboardButton.h:9
yatbcpp::KeyboardButton::setRequest_contact
void setRequest_contact(const std::optional< bool > &request_contact)
Definition:
KeyboardButton.cc:30
yatbcpp::KeyboardButton::KeyboardButton
KeyboardButton(std::string text)
Definition:
KeyboardButton.cc:12
yatbcpp::KeyboardButton::request_location
std::optional< bool > request_location
Definition:
KeyboardButton.h:29
KeyboardButton.h
std
yatbcpp
Definition:
Bot.h:27
yatbcpp::KeyboardButton::getRequest_location
const std::optional< bool > & getRequest_location() const
Definition:
KeyboardButton.cc:50
yatbcpp::KeyboardButton::text
std::string text
Definition:
KeyboardButton.h:27
yatbcpp::KeyboardButton::getRequest_contact
const std::optional< bool > & getRequest_contact() const
Definition:
KeyboardButton.cc:46
yatbcpp::KeyboardButton::setRequest_location
void setRequest_location(const std::optional< bool > &request_location)
Definition:
KeyboardButton.cc:34
yatbcpp::KeyboardButton::getText
const std::string & getText() const
Definition:
KeyboardButton.cc:42
Generated by
1.8.13