| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ShrubberyCreationForm.cpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2025/12/30 15:05:32 by bchanot #+# #+# */
- /* Updated: 2025/12/30 17:51:52 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "ShrubberyCreationForm.hpp"
- #include <fstream>
- /*
- ** ------------------------------- 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 ---------------------------------
- */
- /* ************************************************************************** */
|