Esempio n. 1
0
void		Bureaucrat::executeForm( Form const & form ) const
{
	try
	{
		form.execute(*this);
		std::cout << this->getName() << " executes " << form.getName() << std::endl;
	}
	catch (Form::GradeTooLowException & e)
	{
		std::cout << this->getName() << " can't executes " << form.getName() << "cause his grade is " << this->getGrade() << " and need to be " << form.getExecGrade() << std::endl;
	}
	catch (Form::NotSignedException & e)
	{
		std::cout << this->getName() << " can't executes " << form.getName() << " cause the form " << form.getName() << " is not signed !" << std::endl;
	}
}
Esempio n. 2
0
Form::Form( Form const & src ) : _name(src.getName()), _sign_grade(src.getSignGrade()),
 _exec_grade(src.getExecGrade()), _status( src.getStatus() )
{
	*this = src;
	return ;
}