feat: adding files made in fablab

This commit is contained in:
Raphael 2025-03-19 16:11:05 +01:00
parent 9067bf46fc
commit 5d81e1e176
17 changed files with 885 additions and 12 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/17 14:19:41 by rparodi #+# #+# */
/* Updated: 2025/03/18 09:42:55 by rparodi ### ########.fr */
/* Updated: 2025/03/18 11:44:31 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -79,14 +79,14 @@ std::ostream& operator<<(std::ostream& output, Form const &toPrint) {
return (output);
}
void Form::beSigned(Bureaucrat &bureaucrat) {
void Form::beSigned(Bureaucrat const &bureaucrat) const {
if (bureaucrat.getGrade() > this->_to_sign) {
throw FormForSupperior();
} else if (_signed == true) {
throw FormAlreadySigned();
}
else {
std::cout << "Bureaucrat " << bureaucrat.getName() << " signs the form " << this->_name << std::endl;
std::cout << "Bureaucrat " << bureaucrat.getName() << " signs the Form " << this->_name << std::endl;
this->_signed = true;
}
}