#pragma once #include #include #include #include class Bureaucrat; class AForm { public: AForm(); AForm(const AForm& other); AForm(const std::string& name); AForm(const std::string& name, const unsigned short gradeToSign, const unsigned short gradeToExecute); void beSigned(Bureaucrat& bureaucrat); void execute(Bureaucrat const & executor) const; const std::string& getName() const; bool getIsSigned() const; unsigned short getGradeToSign() const; unsigned short getGradeToExecute() const; AForm& operator=(const AForm& other); virtual ~AForm(); protected: virtual void executeAction() const = 0; private: const std::string name; bool isSigned; const unsigned short gradeToSign; const unsigned short gradeToExecute; class GradeTooHighException : public std::exception { public: const char* what() const throw(); }; class GradeTooLowException : public std::exception { public: const char* what() const throw(); }; class FormNotSignedException : public std::exception { public: const char* what() const throw(); }; }; std::ostream& operator<<(std::ostream& ostream, const AForm& form);