ajout ex03 et correction dump core
This commit is contained in:
40
d05/ex03/headers/Intern.hpp
Normal file
40
d05/ex03/headers/Intern.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef INTERN_HPP
|
||||
# define INTERN_HPP
|
||||
|
||||
# include "colors.h"
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
|
||||
# include <AForm.hpp>
|
||||
# include <ShrubberyCreationForm.hpp>
|
||||
# include <PresidentialPardonForm.hpp>
|
||||
# include <RobotomyRequestForm.hpp>
|
||||
|
||||
typedef AForm * (*t_func)(std::string const & target);
|
||||
|
||||
typedef struct s_formModel {
|
||||
std::string const name;
|
||||
t_func const create;
|
||||
} t_formModel;
|
||||
|
||||
class Intern {
|
||||
|
||||
public:
|
||||
Intern();
|
||||
Intern( Intern const & src );
|
||||
~Intern();
|
||||
Intern & operator=( Intern const & rhs );
|
||||
|
||||
AForm * makeForm(std::string formName, std::string formTarget) const;
|
||||
|
||||
private:
|
||||
static const t_formModel _chooseForm[];
|
||||
|
||||
static AForm * makeShrubbery(std::string const &target);
|
||||
static AForm * makePresidential(std::string const &target);
|
||||
static AForm * makeRobotomy(std::string const &target);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user