CPP00
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Contact.hpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* Contact.hpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/03/19 23:59:45 by kamitsui #+# #+# */
9
/* Updated: 2025/04/12 14:28:14 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
25
#ifndef CONTACT_HPP
26
#define CONTACT_HPP
27
28
#include <
string
>
29
37
class
Contact
{
38
private
:
39
std::string
firstName;
40
std::string
lastName;
41
std::string
nickName;
42
std::string
phoneNumber;
43
std::string
darkestSecret;
44
45
public
:
46
Contact
();
47
void
setFirstName
(
const
std::string
&firstName);
48
void
setLastName
(
const
std::string
&lastName);
49
void
setNickName
(
const
std::string
&nickName);
50
void
setPhoneNumber
(
const
std::string
&phoneNumber);
51
void
setDarkestSecret
(
const
std::string
&darkestSecret);
52
53
std::string
getFirstName
()
const
;
54
std::string
getLastName
()
const
;
55
std::string
getNickName
()
const
;
56
std::string
getPhoneNumber
()
const
;
57
std::string
getDarkestSecret
()
const
;
58
59
bool
isEmpty
()
const
;
60
};
61
62
#endif
// CONTACT_HPP
string
std::basic_string
Contact
Defines the Contact class.
Definition
Contact.hpp:37
Contact::isEmpty
bool isEmpty() const
Check if an object (contact) has empty member variable.
Definition
Contact.cpp:105
Contact::getLastName
std::string getLastName() const
Gets the last name
Definition
Contact.cpp:77
Contact::setFirstName
void setFirstName(const std::string &firstName)
Sets first name of contact.
Definition
Contact.cpp:35
Contact::getDarkestSecret
std::string getDarkestSecret() const
Gets the darkest secret of contact.
Definition
Contact.cpp:98
Contact::setNickName
void setNickName(const std::string &nickName)
Sets the nick name of contact.
Definition
Contact.cpp:49
Contact::getPhoneNumber
std::string getPhoneNumber() const
Gets the phone number of contact.
Definition
Contact.cpp:91
Contact::setDarkestSecret
void setDarkestSecret(const std::string &darkestSecret)
Sets the darkest secret of contact.
Definition
Contact.cpp:63
Contact::setPhoneNumber
void setPhoneNumber(const std::string &phoneNumber)
Sets the phone number of contact.
Definition
Contact.cpp:56
Contact::getFirstName
std::string getFirstName() const
Gets the first name of contact.
Definition
Contact.cpp:70
Contact::Contact
Contact()
Default constractor for the Contact class.
Definition
Contact.cpp:28
Contact::setLastName
void setLastName(const std::string &lastName)
Sets last name of contact.
Definition
Contact.cpp:42
Contact::getNickName
std::string getNickName() const
Gets the nick name of contact.
Definition
Contact.cpp:84
ex01
Contact.hpp
構築:
1.9.8