CPP05 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
ControllableFailingFactory.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ControllableFailingFactory.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/07/18 19:22:01 by kamitsui #+# #+# */
9/* Updated: 2025/07/18 19:23:08 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef CONTROLLABLEFAILINGFACTORY_HPP
14#define CONTROLLABLEFAILINGFACTORY_HPP
15
16#include "IFormFactory.hpp"
17#include <new>
18
19// For testing, the timing of failure can be controlledFactory.
21 private:
22 static int failCounter;
23
24 public:
25 static void setFailAfter(int count);
26 void checkFailure() const;
27
28 virtual AForm *createShrubbery(const std::string &target) const;
29 virtual AForm *createRobotomy(const std::string &target) const;
30 virtual AForm *createPresidential(const std::string &target) const;
31};
32
33#endif
An abstract base class for forms.
Definition AForm.hpp:34
virtual AForm * createRobotomy(const std::string &target) const
virtual AForm * createPresidential(const std::string &target) const
virtual AForm * createShrubbery(const std::string &target) const