-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathShrubberyCreationForm.cpp
More file actions
57 lines (47 loc) · 2.64 KB
/
Copy pathShrubberyCreationForm.cpp
File metadata and controls
57 lines (47 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ShrubberyCreationForm.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dpoveda- <me@izenynn.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/18 01:35:50 by dpoveda- #+# #+# */
/* Updated: 2022/02/18 02:19:21 by dpoveda- ### ########.fr */
/* */
/* ************************************************************************** */
#include "ShrubberyCreationForm.hpp"
#include <fstream>
ShrubberyCreationForm::ShrubberyCreationForm()
: Form("shrubbery creation", "none", 145, 137) {}
ShrubberyCreationForm::ShrubberyCreationForm(const std::string& target)
: Form("shrubbery creation", target, 145, 137) {
std::cout << "Shrubbery Creation Form created" << std::endl;
}
ShrubberyCreationForm::ShrubberyCreationForm(const ShrubberyCreationForm& other)
: Form(other.getName(), other.getTarget(), other.getSignGrade(), other.getExecuteGrade()) {
*this = other;
std::cout << "Copy of Shrubbery Creation Form created" << std::endl;
}
ShrubberyCreationForm::~ShrubberyCreationForm() {
std::cout << "Shrubbery Creation Form destroyed" << std::endl;
}
ShrubberyCreationForm& ShrubberyCreationForm::operator=(const ShrubberyCreationForm& other) {
std::cout << "Shrubbery Creation Form assignment operator" << std::endl;
if (this == &other) return *this;
return *this;
}
void ShrubberyCreationForm::executeAction() const {
std::ofstream out;
out.open((this->getTarget() + "_shrubbery").c_str(), std::ofstream::in | std::ofstream::trunc);
out << std::endl;
out << " ,@@@@@@@, " << std::endl;
out << " ,,,. ,@@@@@@/@@, .oo8888o. " << std::endl;
out << " ,&&%&%&&%,@@@@@/@@@@@@,8888|88/8o " << std::endl;
out << " ,%&|%&&%&&%,@@@|@@@/@@@88|88888/88' " << std::endl;
out << " %&&%&%&/%&&%@@|@@/ /@@@88888|88888' " << std::endl;
out << " %&&%/ %&&%&&@@| V /@@' `88|8 `/88' " << std::endl;
out << " `&%| ` /%&' |.| | '|8' " << std::endl;
out << " |o| | | | | " << std::endl;
out << " |.| | | | | " << std::endl;
out << " ||/ ._|//_/__/ ,|_//__||/. |_//__/_ " << std::endl;
}