55 lines
1.7 KiB
C++
55 lines
1.7 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* Form.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/03/08 20:10:59 by adjoly #+# #+# */
|
|
/* Updated: 2025/03/30 15:11:58 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 Bureaucrat;
|
|
|
|
class Form {
|
|
public:
|
|
Form(void);
|
|
Form(std::string name, uint8_t minForSign, uint8_t minForExec);
|
|
~Form(void);
|
|
|
|
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:
|
|
const std::string _name;
|
|
bool _signed;
|
|
const uint8_t _minForSign;
|
|
const uint8_t _minForExec;
|
|
};
|
|
|
|
std::ostream &operator<<(std::ostream &, Form &);
|