1
0

」 feat: finished ex03

This commit is contained in:
2025-04-03 16:07:05 +02:00
parent bb8d13b9ed
commit bd578ea11e
17 changed files with 811 additions and 5 deletions

View File

@ -0,0 +1,48 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PresidentialPardonForm.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/03 09:45:26 by adjoly #+# #+# */
/* Updated: 2025/04/03 14:13:21 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "PresidentialPardonForm.hpp"
#include "AForm.hpp"
PresidentialPardonForm::PresidentialPardonForm(void)
: AForm("PresidentialPardonForm", 25, 5) {
_log("", "PresidentialPardonForm", "", "default constructor called");
}
PresidentialPardonForm::PresidentialPardonForm(
const PresidentialPardonForm &cpy) : AForm(cpy) {
_log("", "PresidentialPardonForm", "", "copy constructor called");
if (this != &cpy)
*this = cpy;
}
PresidentialPardonForm::PresidentialPardonForm(std::string &target)
: AForm(target, 25, 5) {
_log("", "PresidentialPardonForm", "", "target constructor called");
}
PresidentialPardonForm::~PresidentialPardonForm(void) {
_log("", "PresidentialPardonForm", "", "destructor called");
}
PresidentialPardonForm &
PresidentialPardonForm::operator=(const PresidentialPardonForm &cpy) {
_log("", "PresidentialPardonForm", "",
"copy assignement constructor called");
(void)cpy;
return *this;
}
void PresidentialPardonForm::_exec(const Bureaucrat &b) const {
std::cout << b.getName() << " has been pardoned by Zaphod Beeblebrox 🙀"
<< std::endl;
}