d05 ex01 form ok

This commit is contained in:
Hugo LAMY
2022-02-28 17:56:20 +01:00
parent ce1bde6d2c
commit 4946eb3b8c
11 changed files with 452 additions and 11 deletions

46
d05/ex01/headers/Form.hpp Normal file
View File

@@ -0,0 +1,46 @@
#ifndef FORM_HPP
# define FORM_HPP
# include "color.h"
# include <iostream>
# include <string>
class Bureaucrat;
# include "Bureaucrat.hpp"
class Form {
public:
Form( std::string name, int signedGrade, int executeGrade );
Form( Form const & src );
~Form();
Form & operator=( Form const & rhs );
std::string getName() const;
bool getSigned() const;
int getSignedGrade() const;
int getExecuteGrade() const;
void beSigned( Bureaucrat const & b );
private:
Form();
class GradeTooHighException : public std::exception {
const char * what() const throw();};
class GradeTooLowException : public std::exception {
const char * what() const throw();};
std::string const _name;
bool _signed;
int const _signedGrade;
int const _executeGrade;
};
std::ostream & operator<<(std::ostream & o, Form const & rhs);
#endif