cpp-partie-2/cpp05/ex02/ShrubberyCreationForm.cpp
2024-02-20 19:24:13 +01:00

36 lines
1.6 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ShrubberyCreationForm.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/20 16:54:52 by fgras-ca #+# #+# */
/* Updated: 2024/02/20 19:23:43 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
#include "ShrubberyCreationForm.hpp"
ShrubberyCreationForm::ShrubberyCreationForm(const std::string& target)
: AForm("ShrubberyCreationForm", 145, 137, target) {}
ShrubberyCreationForm::ShrubberyCreationForm(const ShrubberyCreationForm& other)
: AForm(other) {}
ShrubberyCreationForm& ShrubberyCreationForm::operator=(const ShrubberyCreationForm& other)
{
AForm::operator=(other);
return (*this);
}
ShrubberyCreationForm::~ShrubberyCreationForm() {}
void ShrubberyCreationForm::execute(Bureaucrat const &executor) const
{
AForm::execute(executor); // Assurez-vous que cette vérification est implémentée dans AForm ou faites-la ici.
std::ofstream ofs(getTarget() + "_shrubbery");
// Assurez-vous que ofs est ouvert correctement.
ofs << "ASCII trees" << std::endl;
}