blob: c27874a4e66d06c631f36232de181328530f3aad (
plain)
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Intern.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/17 13:39:59 by cacharle #+# #+# */
/* 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:
Intern();
Intern(const Intern& other);
Intern& operator=(const Intern& other);
~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
|