/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ShrubberyCreationForm.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/30 15:05:32 by bchanot #+# #+# */ /* Updated: 2025/12/30 17:51:52 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "ShrubberyCreationForm.hpp" #include /* ** ------------------------------- CONSTRUCTOR -------------------------------- */ ShrubberyCreationForm::ShrubberyCreationForm() : AForm("ShrubberyCreationForm", 137, 145, "DefaultTargetForm") { } ShrubberyCreationForm::ShrubberyCreationForm( const std::string & target ) : AForm("ShrubberyCreationForm", 137, 145, target) { } ShrubberyCreationForm::ShrubberyCreationForm( const ShrubberyCreationForm & src ) : AForm(src.getName(), src.getSignGrade(), src.getExecutionGrade(), src._target) { } /* ** -------------------------------- DESTRUCTOR -------------------------------- */ ShrubberyCreationForm::~ShrubberyCreationForm() { } /* ** --------------------------------- OVERLOAD --------------------------------- */ ShrubberyCreationForm & ShrubberyCreationForm::operator=( ShrubberyCreationForm const & rhs ) { (void)rhs; //if ( this != &rhs ) //{ //this->_value = rhs.getValue(); //} return *this; } std::ostream & operator<<( std::ostream & o, ShrubberyCreationForm const & i ) { (void)i; //o << "Value = " << i.getValue(); return o; } /* ** --------------------------------- METHODS ---------------------------------- */ void ShrubberyCreationForm::action(void) const { std::string const filename = this->_target + "_shrubbery"; std::ofstream ofs(filename.c_str()); ofs << "Beautiful ascii tree" << std::endl; ofs.close(); } /* ** --------------------------------- ACCESSOR --------------------------------- */ /* ************************************************************************** */