diff --git a/ex01/src/Form.cpp b/ex01/src/Form.cpp index c5d6858..45d02fc 100644 --- a/ex01/src/Form.cpp +++ b/ex01/src/Form.cpp @@ -1,6 +1,7 @@ #include "Form.hpp" #include +#include #include Form::Form() @@ -53,3 +54,30 @@ void Form::beSigned(const Bureaucrat &bureaucrat) this->_signed = true; std::cout << bureaucrat.getName() << " signed " << this->_name << std::endl; } + +const std::string& Form::getName() const +{ + return this->_name; +} + +bool Form::getSigned() const +{ + return this->_signed; +} + +int Form::getGradeToBeExecute() const +{ + return this->_to_execute; +} + +int Form::getGradeToBeSign() const +{ + return this->_to_sign; +} + +std::ostream& operator<<(std::ostream& os, const Form& src) +{ + os << src.getName() << " Form signed: " << src.getSigned() << ", grade to be execute " << src.getGradeToBeExecute() << ", grade to be sign: " << src.getGradeToBeSign() << std::endl; + + return os; +} diff --git a/ex01/src/Form.hpp b/ex01/src/Form.hpp index 9e0796a..76c9872 100644 --- a/ex01/src/Form.hpp +++ b/ex01/src/Form.hpp @@ -23,6 +23,11 @@ class Form Form& operator=(const Form& src); + const std::string& getName() const; + bool getSigned() const; + int getGradeToBeExecute() const; + int getGradeToBeSign() const; + void beSigned(const Bureaucrat& bureaucrat); class GradeTooHighException: public std::exception