CPP05 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
ShrubberyCreationForm.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ShrubberyCreationForm.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/06/30 12:12:33 by kamitsui #+# #+# */
9/* Updated: 2025/07/02 17:08:37 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
18#ifndef SHRUBBERYCREATIONFORM_HPP
19#define SHRUBBERYCREATIONFORM_HPP
20
21#include "AForm.hpp"
22#include <fstream>
23
29 private:
31
32 public:
33 // Orthodox Canonical Form
38
39 // Action
40 virtual void performAction() const;
41};
42
43// ASCIIアートの各行を文字列配列として定義
44// 好みに合わせて内容を編集してください。
45const char* const ASCII_ART[] = {\
46 " :.",
47 " -#*",
48 " -###*",
49 " -#####*",
50 " -+++++++#######*++++++=.",
51 " :*##################=.",
52 " .+#############*-",
53 " =############.",
54 " :-*###%%%%%####+:.",
55 " :--+%%%##*++*#%%%#--:.",
56 " :----##*+=-----==+*#+---:.",
57 " :-----==-----===-----==-----:.",
58 " :------------=======------------:.",
59 " :-------------=========-------------:.",
60 " :--------------============-------------:.",
61 " :--------------=====+++++=====--------------:.",
62 " :---------------======++++++======--------------:.",
63 " :---------------=========++++========----------------.",
64 "...............-========================:..............",
65 " -============++===========-.",
66 " :=============+++=============-.",
67 " -=============+++++==============:",
68 " :===============++++++==============-",
69 " -===============++++++++=====-=========:",
70 " :================++++++++++====+****======-",
71 " .-================++++++++++++===*****+-======:",
72 " ................:+++++++++++++=...-==:.........",
73 " =++++++++++++++:",
74 " -++++++++++++++++.",
75 " -++++++++++++++++++",
76 " :+++++++++++++++++++=",
77 " .+++++++++++++++++++++-",
78 " +++++++++++++++++++++++-",
79 " =++++++++++++++++++++++++:",
80 " -++++++++++++++++++++++++++.",
81 " -++++++++++++++++++===+++++++ =**##*- :#*##+-#####+",
82 " :+++++++++++++++++++====++++++= =%@@@@#: -@@@= -@@@@@#",
83 " .+++++++++++++++++++++++++++++++- -%@@@@*. -%= :@@@@@#",
84 " +++++++++++++++++++++++++++++++++- =%@@@@*. .*@@@@%-",
85 " =++++++++++++++++++++++++++++++++++: =%@@@@*: .*@@@@%=",
86 " -++++++++++++++++++++++++++++++++++++. -%@@@@+. .*@@@@%=",
87 " -++++++++++++++++++++++++++++++++++++++. #@@@@@%**#########. :@@@@@# .=",
88 " .............:------------.............. %@@@@@@@@@@@@@@@@@: -@@@@@# .+@#",
89 " -----------: *###########@@@@@@: -@@@@@#:*@@@#",
90 " -----------: %@@@@@. .-----::----:",
91 " -----------: %@@@@@.",
92 " *#####.",
93 " ",
94 " Merry Christmas! "
95};
96
97// ASCIIアートの行数を計算
98const int ASCII_ART_HEIGHT = sizeof(ASCII_ART) / sizeof(ASCII_ART[0]);
99
100#endif
An abstract base class for forms.
Definition AForm.hpp:34
A concrete form that creates a file with ASCII trees.
ShrubberyCreationForm & operator=(const ShrubberyCreationForm &other)
virtual void performAction() const
Creates a file named "_target" + "_shrubbery" and writes ASCII trees to it.
const char *const ASCII_ART[]
const int ASCII_ART_HEIGHT
Defines the abstract base class AForm for all specific forms.