aboutsummaryrefslogtreecommitdiff
path: root/cpp05/ex03/Intern.hpp
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-11-17 19:02:35 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-11-17 19:02:35 +0100
commit452e6bfa7bb4bca75dc4659bf9d707101b411977 (patch)
treef4ee27a96437d6d17a89bbbbc135ae45f9f3faae /cpp05/ex03/Intern.hpp
parenta92013c92bfcd50b0e2561280c9eaa604843ade0 (diff)
downloadpiscine_cpp-452e6bfa7bb4bca75dc4659bf9d707101b411977.tar.gz
piscine_cpp-452e6bfa7bb4bca75dc4659bf9d707101b411977.tar.bz2
piscine_cpp-452e6bfa7bb4bca75dc4659bf9d707101b411977.zip
Added cpp05/ex02 main, Added cpp05/ex03
Diffstat (limited to 'cpp05/ex03/Intern.hpp')
-rw-r--r--cpp05/ex03/Intern.hpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/cpp05/ex03/Intern.hpp b/cpp05/ex03/Intern.hpp
index 60c2ac8..c27874a 100644
--- a/cpp05/ex03/Intern.hpp
+++ b/cpp05/ex03/Intern.hpp
@@ -6,13 +6,18 @@
/* By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/17 13:39:59 by cacharle #+# #+# */
-/* Updated: 2020/11/17 13:48:08 by cacharle ### ########.fr */
+/* Updated: 2020/11/17 17:58:02 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef INTERN_HPP
# define INTERN_HPP
+# include "Form.hpp"
+# include "ShrubberyCreationForm.hpp"
+# include "PresidentialPardonForm.hpp"
+# include "RobotomyRequestForm.hpp"
+
class Intern
{
public:
@@ -22,7 +27,19 @@ public:
~Intern();
Form *makeForm(std::string const& name, std::string const& target);
+
private:
+ Form *makeShrubberyCreationForm(std::string const& target);
+ Form *makePresidentialPardonForm(std::string const& target);
+ Form *makeRobotomyRequestForm(std::string const& target);
+
+ typedef Form* (Intern::* makeFormFunc)(std::string const&);
+ struct makeFormEntry
+ {
+ std::string const name;
+ makeFormFunc const func;
+ };
+ static makeFormEntry makeFormDispatch[];
};
#endif