1
0
This repository has been archived on 2025-05-13. You can view files and clone it, but cannot push or open issues or pull requests.
Files
CPP_Module_05/ex02/PresidentialPardonForm.cpp
2025-04-03 14:34:21 +02:00

49 lines
2.0 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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;
}