「🎉」 init: hello world !
This commit is contained in:
63
ex01/Bureaucrat.hpp
Normal file
63
ex01/Bureaucrat.hpp
Normal file
@@ -0,0 +1,63 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Bureaucrat.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/18 20:11:25 by mmoussou #+# #+# */
|
||||
/* Updated: 2025/06/27 14:05:55 by mmoussou ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
void _log(std::string emoji, std::string what, std::string who, std::string str);
|
||||
|
||||
class Form;
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
|
||||
#define MAXGRADE 1
|
||||
#define MINGRADE 150
|
||||
|
||||
class Bureaucrat {
|
||||
public:
|
||||
Bureaucrat(void);
|
||||
Bureaucrat(const Bureaucrat &cpy);
|
||||
Bureaucrat(uint8_t grade);
|
||||
Bureaucrat(std::string name);
|
||||
Bureaucrat(std::string name, uint8_t grade);
|
||||
~Bureaucrat(void);
|
||||
|
||||
Bureaucrat &operator=(const Bureaucrat& other);
|
||||
|
||||
const std::string &getName(void) const;
|
||||
uint8_t getGrade(void) const;
|
||||
|
||||
void IncrementGrade(void);
|
||||
void DecrementGrade(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();
|
||||
};
|
||||
|
||||
void signForm(Form &);
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
uint8_t _grade;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &, Bureaucrat &);
|
||||
Reference in New Issue
Block a user