yatbcpp
0.0.1
Yet another Telegram Bot CPP Library
src
types
Contact.cc
Go to the documentation of this file.
1
#include <string>
2
#include <optional>
3
#include "
types/Contact.h
"
4
5
using namespace
yatbcpp
;
6
using namespace
std
;
7
9
// Constructor Section //
11
12
Contact::Contact
(std::string phone_number, std::string first_name):
13
phone_number(phone_number), first_name(first_name)
14
{
15
16
}
17
18
Contact::Contact
(
const
Contact
&
Contact
):
19
phone_number
(Contact.
phone_number
),
first_name
(Contact.
first_name
)
20
{
21
last_name
= Contact.
last_name
;
22
user_id
= Contact.
user_id
;
23
}
24
25
27
// Setter Section //
29
30
void
Contact::setLast_name
(
const
optional<string> &
last_name
) {
31
Contact::last_name
=
last_name
;
32
}
33
34
void
Contact::setUser_id
(
const
optional<int32_t> &
user_id
) {
35
Contact::user_id
=
user_id
;
36
}
37
39
// Getter Section //
41
42
43
const
string
&
Contact::getPhone_number
()
const
{
44
return
phone_number
;
45
}
46
47
const
string
&
Contact::getFirst_name
()
const
{
48
return
first_name
;
49
}
50
51
const
optional<string> &
Contact::getLast_name
()
const
{
52
return
last_name
;
53
}
54
55
const
optional<int32_t> &
Contact::getUser_id
()
const
{
56
return
user_id
;
57
}
yatbcpp::Contact::setLast_name
void setLast_name(const std::optional< std::string > &last_name)
Definition:
Contact.cc:30
yatbcpp::Contact::last_name
std::optional< std::string > last_name
Definition:
Contact.h:30
yatbcpp::Contact::getPhone_number
const std::string & getPhone_number() const
Definition:
Contact.cc:43
Contact.h
std
yatbcpp::Contact::setUser_id
void setUser_id(const std::optional< std::int32_t > &user_id)
Definition:
Contact.cc:34
yatbcpp::Contact::user_id
std::optional< std::int32_t > user_id
Definition:
Contact.h:31
yatbcpp
Definition:
Bot.h:27
yatbcpp::Contact
Definition:
Contact.h:9
yatbcpp::Contact::first_name
std::string first_name
Definition:
Contact.h:29
yatbcpp::Contact::getFirst_name
const std::string & getFirst_name() const
Definition:
Contact.cc:47
yatbcpp::Contact::getUser_id
const std::optional< std::int32_t > & getUser_id() const
Definition:
Contact.cc:55
yatbcpp::Contact::Contact
Contact(std::string phone_number, std::string first_name)
Definition:
Contact.cc:12
yatbcpp::Contact::phone_number
std::string phone_number
Definition:
Contact.h:28
yatbcpp::Contact::getLast_name
const std::optional< std::string > & getLast_name() const
Definition:
Contact.cc:51
Generated by
1.8.13