45 lines
848 B
C++
45 lines
848 B
C++
#ifndef FORM_HPP
|
|
#define FORM_HPP
|
|
|
|
#include <exception>
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
class Bureaucrat;
|
|
|
|
class Form
|
|
{
|
|
private:
|
|
const std::string _name;
|
|
bool _signed;
|
|
const int _grade_ex;
|
|
const int _grade_si;
|
|
|
|
public:
|
|
Form();
|
|
Form(const std::string name, const int grade_si, const int grade_ex);
|
|
Form(const Form &other);
|
|
~Form();
|
|
Form &operator=(const Form &other);
|
|
|
|
void beSigned(const Bureaucrat &bureaucrat);
|
|
std::string getName() const;
|
|
bool getSigned() const;
|
|
int getExecuteGrade() const;
|
|
int getSignGrade() const;
|
|
|
|
class GradeTooLowException : public std::exception
|
|
{
|
|
public:
|
|
virtual const char *what() const throw();
|
|
};
|
|
|
|
class GradeTooHighException : public std::exception
|
|
{
|
|
public:
|
|
virtual const char *what() const throw();
|
|
};
|
|
};
|
|
std::ostream &operator<<(std::ostream &os, Form const &form);
|
|
|
|
#endif |