Intern.hpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* Intern.hpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/12/31 15:40:42 by bchanot #+# #+# */
  9. /* Updated: 2025/12/31 17:53:22 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #ifndef INTERN_HPP
  13. # define INTERN_HPP
  14. # include <iostream>
  15. # include <string>
  16. class AForm;
  17. #include "PresidentialPardonForm.hpp"
  18. #include "RobotomyRequestForm.hpp"
  19. #include "ShrubberyCreationForm.hpp"
  20. class Intern
  21. {
  22. public:
  23. Intern();
  24. Intern( Intern const & src );
  25. ~Intern();
  26. Intern & operator=( Intern const & rhs );
  27. class NotFoundException : public std::exception {
  28. public:
  29. virtual const char *what() const throw() {
  30. return ("Cannot find the given Form");
  31. }
  32. };
  33. AForm *makeForm(std::string const & name, std::string const & target);
  34. AForm *makePresidentialPardonForm(std::string const & target) const;
  35. AForm *makeRobotomyRequest(std::string const & target) const;
  36. AForm *makeShrubberyCreation(std::string const & target) const;
  37. private:
  38. };
  39. std::ostream & operator<<( std::ostream & o, Intern const & i );
  40. #endif /* ********************************************************** INTERN_H */