1
0
Files
CPP_Module_05/ex01/Form.hpp

59 lines
1.8 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Form.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/08 20:10:59 by adjoly #+# #+# */
/* Updated: 2025/04/01 10:57:28 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#include <string>
void _log(std::string emoji, std::string what, std::string who,
std::string str);
typedef unsigned char uint8_t;
#include "Bureaucrat.hpp"
class Form {
public:
Form(void);
Form(std::string name, uint8_t minForSign, uint8_t minForExec);
Form(const Form &);
~Form(void);
Form &operator=(const Form &);
class GradeTooHighException : public std::exception {
public:
virtual const char *what() const throw();
};
class GradeTooLowException : public std::exception {
public:
virtual const char *what() const throw();
};
std::string getName(void) const;
bool getSigned(void) const;
uint8_t getMinForSign(void) const;
uint8_t getMinForExec(void) const;
void beSigned(Bureaucrat);
private:
std::string _name;
bool _signed;
const uint8_t _minForSign;
const uint8_t _minForExec;
void _gradeCheck(void) const;
};
std::ostream &operator<<(std::ostream &, Form &);