Files
42_INT_09_piscine_cpp/d05/ex00/headers/Bureaucrat.hpp
2022-02-28 15:47:00 +01:00

47 lines
775 B
C++

#ifndef BUREAUCRAT_HPP
# define BUREAUCRAT_HPP
# include "color.h"
# include <iostream>
# include <string>
# include <stdexcept>
class Bureaucrat {
public:
Bureaucrat(std::string name, int grade);
Bureaucrat( Bureaucrat const & src );
~Bureaucrat();
Bureaucrat & operator=( Bureaucrat const & rhs );
class GradeTooHighException : public std::exception {
public:
const char * what() const throw();
};
class GradeTooLowException : public std::exception {
public:
const char * what() const throw();
};
std::string getName() const;
int getGrade() const;
void gradeUp();
void gradeDown();
protected:
std::string const _name;
int _grade;
private:
Bureaucrat();
};
std::ostream & operator<<(std::ostream & o, Bureaucrat const & rhs);
#endif