/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ShrubberyCreationForm.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: aortigos target = other.getTarget(); } //std::cout << "AForm copy assigment operator called" << std::endl; return (*this); } ShrubberyCreationForm::~ShrubberyCreationForm() { //std::cout << "Destructor called" } ShrubberyCreationForm::ShrubberyCreationForm(std::string target) : AForm("ShrubberyCreationForm", 145, 137), target(target) { //std::cout << "AForm constructor with params called" << std::endl; } ////////////////// // Getters // ////////////////// std::string ShrubberyCreationForm::getTarget() const { return (this->target); } ////////////////// // Execute // ////////////////// void ShrubberyCreationForm::execute(Bureaucrat const &executor) { if (!this->getIsSigned()) throw FormNotSignedException(); if (this->getGradeToExecute() < executor.getGrade()) throw AForm::GradeTooLowException(); // Other things... } ////////////////// // Exceptions // ////////////////// const char* ShrubberyCreationForm::FormNotSignedException::what() const throw() { return ("form is not signed."); }