mirror of
https://github.com/Ladebeze66/cpp-partie-2.git
synced 2025-12-16 05:57:57 +01:00
36 lines
1.6 KiB
C++
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;
|
|
}
|