/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Form.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/29 16:42:01 by bchanot #+# #+# */ /* Updated: 2025/12/30 14:00:46 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef FORM_HPP # define FORM_HPP # include # include # include class Bureaucrat; class Form { public: Form(); Form( Form const & src ); Form( std::string const name, uint8_t const signGrade, uint8_t const executeGrade ); ~Form(); Form & operator=( Form const & rhs ); 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 !"); } }; std::string const getName(void) const; uint8_t getSignGrade(void) const; uint8_t getExecutionGrade(void) const; bool getSigned(void) const; void beSigned(const Bureaucrat &sch); private: std::string const _name; uint8_t const _signGrade; uint8_t const _executeGrade; bool _signed; }; std::ostream & operator<<( std::ostream & o, Form const & i ); #endif /* ************************************************************ FORM_H */