/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Bureaucrat.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: fgras-ca +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/02/11 12:57:28 by fgras-ca #+# #+# */ /* Updated: 2024/02/22 12:45:13 by fgras-ca ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef BUREAUCRAT_HPP #define BUREAUCRAT_HPP #include #include #include #include "Form.hpp" #define RESET "\033[0m" #define BLACK "\033[30m" #define RED "\033[31m" #define GREEN "\033[32m" #define YELLOW "\033[33m" #define BLUE "\033[34m" #define MAGENTA "\033[35m" #define CYAN "\033[36m" #define WHITE "\033[37m" class Bureaucrat { public: class GradeTooHighException : public std::exception { public: const char* what() const throw(); }; class GradeTooLowException : public std::exception { public: const char* what() const throw(); }; Bureaucrat(); Bureaucrat(const std::string& name, int grade); Bureaucrat(const Bureaucrat& other); Bureaucrat& operator=(const Bureaucrat& other); ~Bureaucrat(); std::string getName() const; int getGrade() const; void incrementGrade(); void decrementGrade(); void signForm(Form& form); private: const std::string name; int grade; }; std::ostream& operator<<(std::ostream& os, const Bureaucrat& bureaucrat); #endif