You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

51 lines
1.7 KiB

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Bureaucrat.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/24 13:06:55 by narnaud #+# #+# */
/* Updated: 2022/06/24 16:57:34 by narnaud ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#include <string>
#include <iostream>
#include <stdexcept>
using std::cout;
using std::endl;
using std::string;
class Bureaucrat{
string _name;
size_t _grade;
public:
Bureaucrat(void);
Bureaucrat(string name, size_t grade) throw (char*);
Bureaucrat(Bureaucrat const & src);
virtual ~Bureaucrat(void);
Bureaucrat & operator= (Bureaucrat const & src);
string getName(void);
size_t getGrade(void);
typedef class GradeTooHighException GTHE;
class GradeTooHighException: virtual public std::exception
{
GTHE(void);
~GTHE(void);
const char *GTHE::what(void);
};
typedef class GradeTooLowException GTLE;
class GradeTooLowException: virtual public std::exception
{
GTLE(void);
~GTLE(void);
const char *GTLE::what(void);
};
};
std::ostream &operator<< (std::ostream &out, Bureaucrat const &b);