From 452e6bfa7bb4bca75dc4659bf9d707101b411977 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 17 Nov 2020 19:02:35 +0100 Subject: Added cpp05/ex02 main, Added cpp05/ex03 --- cpp05/ex03/Intern.hpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'cpp05/ex03/Intern.hpp') 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 +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 -- cgit