cpp05/ex02/Bureaucrat.hpp

44 lines
831 B
C++

#ifndef BUREAUCRAT_HPP
#define BUREAUCRAT_HPP
#include <exception>
#include <iostream>
#include <string>
class Form;
class Bureaucrat
{
private:
const std::string _name;
int _grade;
public:
Bureaucrat();
Bureaucrat(const std::string _name, int _grade);
Bureaucrat(const Bureaucrat &copy);
Bureaucrat &operator=(const Bureaucrat &other);
~Bureaucrat();
std::string getName() const;
int getGrade() const;
void incrementGrade();
void decrementGrade();
void signForm(Form &form);
class GradeTooHighException : public std::exception
{
public:
virtual const char *what() const throw();
};
class GradeTooLowException : public std::exception
{
public:
virtual const char *what() const throw();
};
};
std::ostream &operator<<(std::ostream &os, Bureaucrat const &other);
#endif