diff options
Diffstat (limited to 'cpp00/ex01/Contact.hpp')
| -rw-r--r-- | cpp00/ex01/Contact.hpp | 63 |
1 files changed, 49 insertions, 14 deletions
diff --git a/cpp00/ex01/Contact.hpp b/cpp00/ex01/Contact.hpp index 3d04889..d9fbee6 100644 --- a/cpp00/ex01/Contact.hpp +++ b/cpp00/ex01/Contact.hpp @@ -1,25 +1,60 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* Contact.hpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/13 07:23:11 by charles #+# #+# */ +/* Updated: 2020/04/13 08:57:01 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + #ifndef CONTACT_HPP # define CONTACT_HPP # include <string> +# include <iomanip> +# include <iostream> +# include "utils.hpp" class Contact { public: - Contact(std::string name); - // std::string phone_str(); + static Contact prompt(); + void preview() const; + void put() const; + +private: + static void promptString(std::string promptString, std::string &s); + static void promptInt(std::string promptString, int &i); + static std::string trimedName(std::string name); + + struct Address + { + int m_houseNum; + int m_postCode; + std::string m_street; + std::string m_city; + }; + struct Date + { + int m_day; + int m_month; + int m_year; + }; - std::string first_name; - std::string last_name; - std::string nickname; - std::string login; - std::string postal_address; - std::string email; - std::string phone; - std::string birthday; - std::string fav_meal; - std::string underware_color; - std::string darkest_secret; + std::string m_firstName; + std::string m_lastName; + std::string m_nickname; + std::string m_login; + Address m_address; + std::string m_email; + std::string m_phone; + Date m_birthday; + std::string m_favMeal; + std::string m_underwareColor; + std::string m_darkestSecret; }; -#endif // CONTACT_HPP +#endif |
