CPP05
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
IFormFactory.hpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* IFormFactory.hpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/07/18 19:22:20 by kamitsui #+# #+# */
9
/* Updated: 2025/07/18 19:22:22 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#ifndef IFORMFACTORY_HPP
14
#define IFORMFACTORY_HPP
15
16
#include "
AForm.hpp
"
17
#include <
string
>
18
19
// Form Generator Interface.
20
class
IFormFactory
{
21
public
:
22
virtual
~IFormFactory
() {}
23
// Pure virtual functions to generate three different forms.
24
virtual
AForm
*
createShrubbery
(
const
std::string
&target)
const
= 0;
25
virtual
AForm
*
createRobotomy
(
const
std::string
&target)
const
= 0;
26
virtual
AForm
*
createPresidential
(
const
std::string
&target)
const
= 0;
27
};
28
29
#endif
std::string
AForm
An abstract base class for forms.
Definition
AForm.hpp:34
IFormFactory
Definition
IFormFactory.hpp:20
IFormFactory::createPresidential
virtual AForm * createPresidential(const std::string &target) const =0
IFormFactory::createShrubbery
virtual AForm * createShrubbery(const std::string &target) const =0
IFormFactory::~IFormFactory
virtual ~IFormFactory()
Definition
IFormFactory.hpp:22
IFormFactory::createRobotomy
virtual AForm * createRobotomy(const std::string &target) const =0
AForm.hpp
Defines the abstract base class AForm for all specific forms.
string
ex03
IFormFactory.hpp
構築:
1.9.8