ex02 created
This commit is contained in:
56
ex02/Bureaucrat/Bureaucrat.hpp
Normal file
56
ex02/Bureaucrat/Bureaucrat.hpp
Normal file
@@ -0,0 +1,56 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Bureaucrat.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/02/15 18:00:27 by aortigos #+# #+# */
|
||||
/* Updated: 2026/02/06 02:28:09 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef BUREAUCRAT_HPP
|
||||
|
||||
# define BUREAUCRAT_HPP
|
||||
|
||||
# include <iostream>
|
||||
|
||||
class AForm;
|
||||
|
||||
class Bureaucrat
|
||||
{
|
||||
private:
|
||||
const std::string name;
|
||||
int grade;
|
||||
|
||||
public:
|
||||
Bureaucrat();
|
||||
Bureaucrat(const Bureaucrat &other);
|
||||
Bureaucrat &operator=(const Bureaucrat &other);
|
||||
~Bureaucrat();
|
||||
|
||||
Bureaucrat(std::string name, int grade);
|
||||
|
||||
std::string getName() const;
|
||||
int getGrade() const;
|
||||
|
||||
void incrementGrade();
|
||||
void decrementGrade();
|
||||
|
||||
void signForm(AForm &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, const Bureaucrat &bureaucrat);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user