CPP05 1.0
|
Represents a form that needs to be signed and executed. [詳解]
#include <Form.hpp>
クラス | |
class | GradeTooHighException |
class | GradeTooLowException |
公開メンバ関数 | |
Form (const std::string &name, int gradeToSign, int gradeToExecute) | |
Construct a new Form object. Checks if grades are within the valid range (1-150). | |
Form (const Form &other) | |
Copy constructor for Form. | |
Form & | operator= (const Form &other) |
Assignment operator for Form. Only the signed status is copied as other members are const. | |
~Form () | |
Destroys the Form object. | |
const std::string & | getName () const |
bool | getIsSigned () const |
int | getGradeToSign () const |
int | getGradeToExecute () const |
void | beSigned (const Bureaucrat &bureaucrat) |
Sets the form's status to signed if the bureaucrat's grade is sufficient. | |
Form::Form | ( | const std::string & | name, |
int | gradeToSign, | ||
int | gradeToExecute | ||
) |
Construct a new Form object. Checks if grades are within the valid range (1-150).
name | Name of the form. |
gradeToSign | Grade required to sign the form. |
gradeToExecute | Grade required to execute the form. |
Form::GradeTooHighException | if any grade is < 1. |
Form::GradeTooLowException | if any grade is > 150. |
void Form::beSigned | ( | const Bureaucrat & | bureaucrat | ) |
Sets the form's status to signed if the bureaucrat's grade is sufficient.
bureaucrat | The bureaucrat attempting to sign the form. |
Form::GradeTooLowException | if the bureaucrat's grade is too low. |
const std::string & Form::getName | ( | ) | const |