/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Bureaucrat.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/26 17:51:13 by bchanot #+# #+# */ /* Updated: 2025/12/29 16:31:34 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef BUREAUCRAT_HPP # define BUREAUCRAT_HPP # include # include # include class Bureaucrat { public: Bureaucrat(); Bureaucrat( Bureaucrat const & src ); Bureaucrat( std::string const name, u_int8_t grade ); ~Bureaucrat(); Bureaucrat &operator=( Bureaucrat const & rhs ); Bureaucrat &operator++(); Bureaucrat &operator--(); class GradeTooHighException : public std::exception { public: virtual const char *what() const throw() { return ("The grade specified is too high !"); } }; class GradeTooLowException : public std::exception { public: virtual const char *what() const throw() { return ("The grade specified is too low !"); } }; uint8_t getGrade(void) const; std::string getName(void) const; void decrementGrade(void); void incrementGrade(void); private: std::string _name; uint8_t _grade; }; std::ostream & operator<<( std::ostream & o, Bureaucrat const & i ); #endif /* ****************************************************** BUREAUCRAT_H */