#include "RobotomyRequestForm.hpp" #include "AForm.hpp" #include #include RobotomyRequestForm::RobotomyRequestForm(): AForm("RobotomyRequestForm", 45, 72, "") { } RobotomyRequestForm::RobotomyRequestForm(const std::string& target): AForm("RobotomyRequestForm", 45, 72, target) { std::cout << "RobotomyRequestForm(" << target << ")" << std::endl; } RobotomyRequestForm::RobotomyRequestForm(const RobotomyRequestForm& src): AForm(src) { std::cout << "RobotomyRequestForm(RobotomyRequestForm)" << std::endl; } RobotomyRequestForm& RobotomyRequestForm::operator=(const RobotomyRequestForm& src) { if (this != & src) *this = src; return *this; } void RobotomyRequestForm::execute(const Bureaucrat &exec) const { static bool ok(false); std::cout << "Bzit bzit" << std::endl; if (ok) std::cout << this->_target << " be robotomized" << std::endl; else std::cout << this->_target << " robotomized failed" << std::endl; ok = !ok; AForm::execute(exec); }