/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Bureaucrat.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/24 13:06:55 by narnaud #+# #+# */ /* Updated: 2022/06/24 16:57:34 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #pragma once #include #include #include using std::cout; using std::endl; using std::string; class Bureaucrat{ string _name; size_t _grade; public: Bureaucrat(void); Bureaucrat(string name, size_t grade) throw (char*); Bureaucrat(Bureaucrat const & src); virtual ~Bureaucrat(void); Bureaucrat & operator= (Bureaucrat const & src); string getName(void); size_t getGrade(void); typedef class GradeTooHighException GTHE; class GradeTooHighException: virtual public std::exception { GTHE(void); ~GTHE(void); const char *GTHE::what(void); }; typedef class GradeTooLowException GTLE; class GradeTooLowException: virtual public std::exception { GTLE(void); ~GTLE(void); const char *GTLE::what(void); }; }; std::ostream &operator<< (std::ostream &out, Bureaucrat const &b);