「🏗️」 wip: Started ex01
This commit is contained in:
53
ex01/Form.hpp
Normal file
53
ex01/Form.hpp
Normal file
@ -0,0 +1,53 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Form.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/08 20:10:59 by adjoly #+# #+# */
|
||||
/* Updated: 2025/03/29 15:43:02 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;
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
const std::string getName(void) const;
|
||||
bool getSigned(void);
|
||||
const uint8_t getMinForSign(void);
|
||||
const uint8_t getMinForExec(void);
|
||||
|
||||
void beSigned(Bureaucrat);
|
||||
|
||||
private:
|
||||
const std::string _name;
|
||||
bool _signed;
|
||||
const uint8_t _minForSign;
|
||||
const uint8_t _minForExec;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &, Form &);
|
Reference in New Issue
Block a user