「✨」 feat: finished ex02
This commit is contained in:
@ -6,12 +6,12 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/12/23 13:59:45 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/01 10:49:43 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/03 14:21:09 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "Bureaucrat.hpp"
|
||||
#include "Form.hpp"
|
||||
#include "AForm.hpp"
|
||||
#include <exception>
|
||||
|
||||
void _log(std::string emoji, std::string what, std::string who,
|
||||
@ -56,6 +56,10 @@ Bureaucrat &Bureaucrat::operator=(Bureaucrat const &cpy) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Bureaucrat::executeForm(const AForm &form) const {
|
||||
form.execute(*this);
|
||||
}
|
||||
|
||||
Bureaucrat &Bureaucrat::operator++(void) {
|
||||
_grade--;
|
||||
if (_grade < MAXGRADE)
|
||||
@ -101,7 +105,7 @@ const char *Bureaucrat::GradeTooLowException::what() const throw() {
|
||||
return ("Grade is too low");
|
||||
}
|
||||
|
||||
void Bureaucrat::signForm(Form &f) {
|
||||
void Bureaucrat::signForm(AForm &f) {
|
||||
try {
|
||||
f.beSigned(*this);
|
||||
std::cout << _name << " signed " << f.getName() << std::endl;
|
||||
|
Reference in New Issue
Block a user