blob: abf83be681489ee5169f9b1a45085186e2c88c87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PhoneBook.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/13 09:06:23 by charles #+# #+# */
/* Updated: 2020/11/09 09:28:38 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PHONE_BOOK_HPP
# define PHONE_BOOK_HPP
# define CONTACTS_SIZE 8
# include <string>
# include "Contact.hpp"
class PhoneBook
{
public:
PhoneBook();
void add(Contact contact);
Contact* search(std::string needle);
size_t getSize() const;
Contact const& get(size_t index) const;
private:
Contact m_contacts[CONTACTS_SIZE];
size_t m_size;
};
std::ostream& operator<<(std::ostream& out, PhoneBook const& p);
#endif
|