/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Form.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/26 15:47:12 by narnaud #+# #+# */ /* Updated: 2022/06/27 09:36:10 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #pragma once #include "Bureaucrat.hpp" #include #include #include using std::cout; using std::endl; using std::string; class Bureaucrat; class Form { const string _name; int _signGrade; int _exeGrade; bool _isSigned; public: class GradeTooHighException: virtual public std::exception { public: const char *what(void) const throw (); }; class GradeTooLowException: virtual public std::exception { public: const char *what(void) const throw (); }; Form(void); Form(const string name, const int signGrade,const int exeGrade) throw (GradeTooHighException, GradeTooLowException); Form & operator=(Form const &f); Form(Form const &f); ~Form(void); const string getName(void) const; int getSignGrade(void) const; int getExeGrade(void) const; bool beSigned(const Bureaucrat &b) throw (GradeTooLowException); }; std::ostream &operator<< (std::ostream &out, const Form &f);