diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-19 13:59:12 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-19 13:59:12 +0200 |
| commit | c426fe76ec5925e8c94aae3db04e5e1f1ce1585e (patch) | |
| tree | 1cdbbe15c1ed92f0df3b7041550270690575f1a2 /cpp05/ex01/Bureaucrat.hpp | |
| parent | 60c4c5309af87480fb32f3815bc02031eff43e9b (diff) | |
| download | piscine_cpp-c426fe76ec5925e8c94aae3db04e5e1f1ce1585e.tar.gz piscine_cpp-c426fe76ec5925e8c94aae3db04e5e1f1ce1585e.tar.bz2 piscine_cpp-c426fe76ec5925e8c94aae3db04e5e1f1ce1585e.zip | |
Adding boilerplate cpp05/ex02
Diffstat (limited to 'cpp05/ex01/Bureaucrat.hpp')
| -rw-r--r-- | cpp05/ex01/Bureaucrat.hpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cpp05/ex01/Bureaucrat.hpp b/cpp05/ex01/Bureaucrat.hpp index ff8bb2e..aabf557 100644 --- a/cpp05/ex01/Bureaucrat.hpp +++ b/cpp05/ex01/Bureaucrat.hpp @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 18:04:32 by charles #+# #+# */ -/* Updated: 2020/04/14 19:37:05 by charles ### ########.fr */ +/* Updated: 2020/10/19 13:23:52 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,22 +20,23 @@ class Bureaucrat { public: Bureaucrat(Bureaucrat const& other); - void operator=(Bureaucrat const& other); + Bureaucrat& operator=(Bureaucrat const& other); ~Bureaucrat(); Bureaucrat(std::string const& name, int grade); + std::string const& getName() const; - int getGrade() const; - void incrementGrade(); - void decrementGrade(); - // signForm(); + int getGrade() const; + void incrementGrade(); + void decrementGrade(); + void signForm(Form& form); class GradeTooHighException : public std::exception { public: GradeTooHighException(); GradeTooHighException(GradeTooHighException const& other); - void operator=(GradeTooHighException const& other); + GradeTooHighException& operator=(GradeTooHighException const& other); ~GradeTooHighException(); virtual char const* what() const throw(); }; @@ -45,7 +46,7 @@ public: public: GradeTooLowException(); GradeTooLowException(GradeTooLowException const& other); - void operator=(GradeTooLowException const& other); + GradeTooLowException& operator=(GradeTooLowException const& other); ~GradeTooLowException(); virtual char const* what() const throw(); }; @@ -54,7 +55,7 @@ private: Bureaucrat(); std::string const m_name; - int m_grade; + int m_grade; }; std::ostream& operator<<(std::ostream& out, Bureaucrat const& b); |
