CPP05 1.0
|
An abstract base class for forms. [詳解]
#include <AForm.hpp>
クラス | |
class | FormNotSignedException |
class | GradeTooHighException |
class | GradeTooLowException |
公開メンバ関数 | |
AForm (const std::string &name, int gradeToSign, int gradeToExecute, const std::string &target) | |
AForm (const AForm &other) | |
AForm & | operator= (const AForm &other) |
virtual | ~AForm () |
const std::string & | getName () const |
bool | getIsSigned () const |
int | getGradeToSign () const |
int | getGradeToExecute () const |
const std::string & | getTarget () const |
void | beSigned (const Bureaucrat &bureaucrat) |
void | execute (Bureaucrat const &executor) const |
Central execution logic. Checks requirements before calling specific action. | |
virtual void | performAction () const =0 |
AForm (const std::string &name, int gradeToSign, int gradeToExecute, const std::string &target) | |
AForm (const AForm &other) | |
AForm & | operator= (const AForm &other) |
virtual | ~AForm () |
const std::string & | getName () const |
bool | getIsSigned () const |
int | getGradeToSign () const |
int | getGradeToExecute () const |
const std::string & | getTarget () const |
void | beSigned (const Bureaucrat &bureaucrat) |
void | execute (Bureaucrat const &executor) const |
virtual void | performAction () const =0 |
An abstract base class for forms.
Contains the core logic for signing and executing forms, and defines the interface for specific form actions.
AForm::AForm | ( | const std::string & | name, |
int | gradeToSign, | ||
int | gradeToExecute, | ||
const std::string & | target | ||
) |
AForm::AForm | ( | const std::string & | name, |
int | gradeToSign, | ||
int | gradeToExecute, | ||
const std::string & | target | ||
) |
AForm::AForm | ( | const AForm & | other | ) |
|
virtual |
void AForm::beSigned | ( | const Bureaucrat & | bureaucrat | ) |
void AForm::beSigned | ( | const Bureaucrat & | bureaucrat | ) |
void AForm::execute | ( | Bureaucrat const & | executor | ) | const |
Central execution logic. Checks requirements before calling specific action.
executor | The bureaucrat attempting to execute the form. |
AForm::FormNotSignedException | if the form isn't signed. |
AForm::GradeTooLowException | if the executor's grade is too low. |
void AForm::execute | ( | Bureaucrat const & | executor | ) | const |
int AForm::getGradeToExecute | ( | ) | const |
int AForm::getGradeToSign | ( | ) | const |
bool AForm::getIsSigned | ( | ) | const |
const std::string & AForm::getName | ( | ) | const |
const std::string & AForm::getName | ( | ) | const |
const std::string & AForm::getTarget | ( | ) | const |
const std::string & AForm::getTarget | ( | ) | const |
|
pure virtual |
|
pure virtual |