mirror of
https://github.com/Ladebeze66/cpp-partie-2.git
synced 2025-12-16 05:57:57 +01:00
00
This commit is contained in:
parent
bc0c76ac99
commit
ed40c42452
@ -6,13 +6,18 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/11 14:39:51 by fgras-ca #+# #+# */
|
/* Created: 2024/02/11 14:39:51 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 12:48:40 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 14:47:49 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "Bureaucrat.hpp"
|
#include "Bureaucrat.hpp"
|
||||||
#include "Form.hpp"
|
#include "Form.hpp"
|
||||||
|
|
||||||
|
Form::Form() : name("default"), isSigned(false), gradeRequiredToSign(150), gradeRequiredToExecute(150)
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "Form default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
Form::Form(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute)
|
Form::Form(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute)
|
||||||
: name(name), isSigned(false), gradeRequiredToSign(gradeRequiredToSign), gradeRequiredToExecute(gradeRequiredToExecute)
|
: name(name), isSigned(false), gradeRequiredToSign(gradeRequiredToSign), gradeRequiredToExecute(gradeRequiredToExecute)
|
||||||
{
|
{
|
||||||
@ -24,6 +29,7 @@ Form::Form(const std::string &name, int gradeRequiredToSign, int gradeRequiredTo
|
|||||||
{
|
{
|
||||||
throw GradeTooLowException();
|
throw GradeTooLowException();
|
||||||
}
|
}
|
||||||
|
std::cout << GREEN << "Form" << this->name << "constructor called with grade to sign: " << this->gradeRequiredToSign << " and grade to execute: " << this->gradeRequiredToExecute << RESET << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Form::Form(const Form& other)
|
Form::Form(const Form& other)
|
||||||
|
|||||||
@ -6,38 +6,37 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/11 14:37:14 by fgras-ca #+# #+# */
|
/* Created: 2024/02/11 14:37:14 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/26 15:57:56 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:07:38 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#ifndef FORM_HPP
|
#ifndef FORM_HPP
|
||||||
#define FORM_HPP
|
#define FORM_HPP
|
||||||
|
|
||||||
#include "Bureaucrat.hpp" // Assurez-vous que cette classe est bien définie
|
#include "Bureaucrat.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
class Bureaucrat;
|
class Bureaucrat;
|
||||||
|
|
||||||
class AForm
|
class Form
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
const std::string name;
|
const std::string name;
|
||||||
const
|
|
||||||
bool isSigned;
|
bool isSigned;
|
||||||
const int gradeRequiredToSign;
|
const int gradeRequiredToSign;
|
||||||
const int gradeRequiredToExecute;
|
const int gradeRequiredToExecute;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//constructueur
|
//constructueur
|
||||||
AForm(const::std::string& name);
|
Form();
|
||||||
AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute);
|
Form(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute);
|
||||||
// Constructeur par copie
|
// Constructeur par copie
|
||||||
AForm(const AForm& other);
|
Form(const Form& other);
|
||||||
// Opérateur d'affectation
|
// Opérateur d'affectation
|
||||||
AForm& operator=(const AForm& other);
|
Form& operator=(const Form& other);
|
||||||
// Destructeur
|
// Destructeur
|
||||||
~AForm();
|
~Form();
|
||||||
|
|
||||||
|
|
||||||
std::string getName() const;
|
std::string getName() const;
|
||||||
@ -50,23 +49,17 @@ public:
|
|||||||
class GradeTooHighException : public std::exception
|
class GradeTooHighException : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const char* what() const noexcept override
|
const char* what() const throw();
|
||||||
{
|
|
||||||
return ("Grade too high");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class GradeTooLowException : public std::exception
|
class GradeTooLowException : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const char* what() const noexcept override
|
const char* what() const throw();
|
||||||
{
|
|
||||||
return ("Grade too low");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Surcharge de l'opérateur d'insertion
|
// Surcharge de l'opérateur d'insertion
|
||||||
std::ostream& operator<<(std::ostream& os, const AForm& form);
|
std::ostream& operator<<(std::ostream& os, const Form& form);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -6,13 +6,18 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/11 14:39:51 by fgras-ca #+# #+# */
|
/* Created: 2024/02/11 14:39:51 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/03/02 20:36:08 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 14:52:36 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "Bureaucrat.hpp"
|
#include "Bureaucrat.hpp"
|
||||||
#include "AForm.hpp"
|
#include "AForm.hpp"
|
||||||
|
|
||||||
|
AForm::AForm() : name("default"), isSigned(false), gradeRequiredToSign(150), gradeRequiredToExecute(150)
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "AForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
AForm::AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute)
|
AForm::AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute)
|
||||||
: name(name), isSigned(false), gradeRequiredToSign(gradeRequiredToSign), gradeRequiredToExecute(gradeRequiredToExecute)
|
: name(name), isSigned(false), gradeRequiredToSign(gradeRequiredToSign), gradeRequiredToExecute(gradeRequiredToExecute)
|
||||||
{
|
{
|
||||||
@ -24,6 +29,7 @@ AForm::AForm(const std::string &name, int gradeRequiredToSign, int gradeRequired
|
|||||||
{
|
{
|
||||||
throw GradeTooLowException();
|
throw GradeTooLowException();
|
||||||
}
|
}
|
||||||
|
std::cout << GREEN << "AForm" << this->name << "constructor called with grade to sign: " << this->gradeRequiredToSign << " and grade to execute: " << this->gradeRequiredToExecute << RESET << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
AForm::AForm(const AForm& other)
|
AForm::AForm(const AForm& other)
|
||||||
|
|||||||
@ -6,14 +6,14 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/11 14:37:14 by fgras-ca #+# #+# */
|
/* Created: 2024/02/11 14:37:14 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 13:49:48 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:07:31 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#ifndef AFORM_HPP
|
#ifndef AFORM_HPP
|
||||||
#define AFORM_HPP
|
#define AFORM_HPP
|
||||||
|
|
||||||
#include "Bureaucrat.hpp" // Assurez-vous que cette classe est bien définie
|
#include "Bureaucrat.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//constructueur
|
//constructueur
|
||||||
|
AForm();
|
||||||
AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute);
|
AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute);
|
||||||
// Constructeur par copie
|
// Constructeur par copie
|
||||||
AForm(const AForm& other);
|
AForm(const AForm& other);
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
. 🅻🅰🅳🅴🅱🅴🆉🅴 . +
|
|
||||||
. . . # .
|
|
||||||
. . ### . .
|
|
||||||
. . .#:. .:##°##:. .:#. . .
|
|
||||||
. . ####°###°#### .
|
|
||||||
. #:. .:#.###.#:. .:# . .
|
|
||||||
#########°######### . .
|
|
||||||
. #:. ####°###°#### .:# . .
|
|
||||||
. . °#######°°##°##°°#######° .
|
|
||||||
.°##°#####°#####°##° . .
|
|
||||||
. #:. ... .:##°###°###°##:. ... .:# .
|
|
||||||
. #######°##°#####°##°####### . .
|
|
||||||
. . #####°°#######°°##### . .
|
|
||||||
. 000 . .
|
|
||||||
. . . 000 . . .
|
|
||||||
. ..................O000O.................
|
|
||||||
@ -6,12 +6,17 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/21 11:31:13 by fgras-ca #+# #+# */
|
/* Created: 2024/02/21 11:31:13 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/25 13:29:09 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 14:58:00 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "PresidentialPardonForm.hpp"
|
#include "PresidentialPardonForm.hpp"
|
||||||
|
|
||||||
|
PresidentialPardonForm::PresidentialPardonForm()
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "PresidentialPardonForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
PresidentialPardonForm::PresidentialPardonForm(const std::string& target)
|
PresidentialPardonForm::PresidentialPardonForm(const std::string& target)
|
||||||
: AForm("PresidentialPardonForm", 25, 5), target(target)
|
: AForm("PresidentialPardonForm", 25, 5), target(target)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:56:48 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:56:48 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 15:39:59 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 14:56:39 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ private:
|
|||||||
std::string target;
|
std::string target;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
PresidentialPardonForm();
|
||||||
PresidentialPardonForm(const std::string& target);
|
PresidentialPardonForm(const std::string& target);
|
||||||
PresidentialPardonForm(const PresidentialPardonForm& other);
|
PresidentialPardonForm(const PresidentialPardonForm& other);
|
||||||
PresidentialPardonForm& operator=(const PresidentialPardonForm& other);
|
PresidentialPardonForm& operator=(const PresidentialPardonForm& other);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/21 11:25:21 by fgras-ca #+# #+# */
|
/* Created: 2024/02/21 11:25:21 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/25 13:15:16 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:08:54 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -22,6 +22,11 @@ void RobotomyRequestForm::initializeRandomSeed()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RobotomyRequestForm::RobotomyRequestForm()
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "RobotomyRequestForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
RobotomyRequestForm::RobotomyRequestForm(const std::string& target)
|
RobotomyRequestForm::RobotomyRequestForm(const std::string& target)
|
||||||
: AForm("RobotomyRequestForm", 72, 45), target(target)
|
: AForm("RobotomyRequestForm", 72, 45), target(target)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:55:26 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:55:26 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 16:10:22 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:01:24 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -30,6 +30,7 @@ private:
|
|||||||
std::string target;
|
std::string target;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
RobotomyRequestForm();
|
||||||
RobotomyRequestForm(const std::string& target);
|
RobotomyRequestForm(const std::string& target);
|
||||||
RobotomyRequestForm(const RobotomyRequestForm& other);
|
RobotomyRequestForm(const RobotomyRequestForm& other);
|
||||||
RobotomyRequestForm& operator=(const RobotomyRequestForm& other);
|
RobotomyRequestForm& operator=(const RobotomyRequestForm& other);
|
||||||
|
|||||||
@ -6,12 +6,17 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:54:52 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:54:52 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 16:33:23 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:09:53 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "ShrubberyCreationForm.hpp"
|
#include "ShrubberyCreationForm.hpp"
|
||||||
|
|
||||||
|
ShrubberyCreationForm::ShrubberyCreationForm()
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "ShrubberyCreationForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
ShrubberyCreationForm::ShrubberyCreationForm(const std::string& target)
|
ShrubberyCreationForm::ShrubberyCreationForm(const std::string& target)
|
||||||
: AForm("ShrubberyCreationForm", 145, 137), target(target)
|
: AForm("ShrubberyCreationForm", 145, 137), target(target)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:41:49 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:41:49 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 15:35:33 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:09:14 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ private:
|
|||||||
std::string target;
|
std::string target;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
ShrubberyCreationForm();
|
||||||
ShrubberyCreationForm(const std::string& target);
|
ShrubberyCreationForm(const std::string& target);
|
||||||
ShrubberyCreationForm(const ShrubberyCreationForm& other);
|
ShrubberyCreationForm(const ShrubberyCreationForm& other);
|
||||||
ShrubberyCreationForm& operator=(const ShrubberyCreationForm& other);
|
ShrubberyCreationForm& operator=(const ShrubberyCreationForm& other);
|
||||||
|
|||||||
@ -6,13 +6,18 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/11 14:39:51 by fgras-ca #+# #+# */
|
/* Created: 2024/02/11 14:39:51 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 14:36:36 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:11:19 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "Bureaucrat.hpp"
|
#include "Bureaucrat.hpp"
|
||||||
#include "AForm.hpp"
|
#include "AForm.hpp"
|
||||||
|
|
||||||
|
AForm::AForm() : name("default"), isSigned(false), gradeRequiredToSign(150), gradeRequiredToExecute(150)
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "AForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
AForm::AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute)
|
AForm::AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute)
|
||||||
: name(name), isSigned(false), gradeRequiredToSign(gradeRequiredToSign), gradeRequiredToExecute(gradeRequiredToExecute)
|
: name(name), isSigned(false), gradeRequiredToSign(gradeRequiredToSign), gradeRequiredToExecute(gradeRequiredToExecute)
|
||||||
{
|
{
|
||||||
@ -24,6 +29,7 @@ AForm::AForm(const std::string &name, int gradeRequiredToSign, int gradeRequired
|
|||||||
{
|
{
|
||||||
throw GradeTooLowException();
|
throw GradeTooLowException();
|
||||||
}
|
}
|
||||||
|
std::cout << GREEN << "AForm" << this->name << "constructor called with grade to sign: " << this->gradeRequiredToSign << " and grade to execute: " << this->gradeRequiredToExecute << RESET << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
AForm::AForm(const AForm& other)
|
AForm::AForm(const AForm& other)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/11 14:37:14 by fgras-ca #+# #+# */
|
/* Created: 2024/02/11 14:37:14 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 13:49:48 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 14:54:08 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//constructueur
|
//constructueur
|
||||||
|
AForm();
|
||||||
AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute);
|
AForm(const std::string &name, int gradeRequiredToSign, int gradeRequiredToExecute);
|
||||||
// Constructeur par copie
|
// Constructeur par copie
|
||||||
AForm(const AForm& other);
|
AForm(const AForm& other);
|
||||||
|
|||||||
@ -6,12 +6,17 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/21 11:31:13 by fgras-ca #+# #+# */
|
/* Created: 2024/02/21 11:31:13 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/25 13:29:09 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:15:01 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "PresidentialPardonForm.hpp"
|
#include "PresidentialPardonForm.hpp"
|
||||||
|
|
||||||
|
PresidentialPardonForm::PresidentialPardonForm()
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "PresidentialPardonForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
PresidentialPardonForm::PresidentialPardonForm(const std::string& target)
|
PresidentialPardonForm::PresidentialPardonForm(const std::string& target)
|
||||||
: AForm("PresidentialPardonForm", 25, 5), target(target)
|
: AForm("PresidentialPardonForm", 25, 5), target(target)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:56:48 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:56:48 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 15:39:59 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:07:10 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ private:
|
|||||||
std::string target;
|
std::string target;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
PresidentialPardonForm();
|
||||||
PresidentialPardonForm(const std::string& target);
|
PresidentialPardonForm(const std::string& target);
|
||||||
PresidentialPardonForm(const PresidentialPardonForm& other);
|
PresidentialPardonForm(const PresidentialPardonForm& other);
|
||||||
PresidentialPardonForm& operator=(const PresidentialPardonForm& other);
|
PresidentialPardonForm& operator=(const PresidentialPardonForm& other);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/21 11:25:21 by fgras-ca #+# #+# */
|
/* Created: 2024/02/21 11:25:21 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/25 13:15:16 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:03:42 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -22,6 +22,11 @@ void RobotomyRequestForm::initializeRandomSeed()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RobotomyRequestForm::RobotomyRequestForm()
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "RobotomyRequestForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
RobotomyRequestForm::RobotomyRequestForm(const std::string& target)
|
RobotomyRequestForm::RobotomyRequestForm(const std::string& target)
|
||||||
: AForm("RobotomyRequestForm", 72, 45), target(target)
|
: AForm("RobotomyRequestForm", 72, 45), target(target)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:55:26 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:55:26 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 16:10:22 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:06:32 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -30,6 +30,7 @@ private:
|
|||||||
std::string target;
|
std::string target;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
RobotomyRequestForm();
|
||||||
RobotomyRequestForm(const std::string& target);
|
RobotomyRequestForm(const std::string& target);
|
||||||
RobotomyRequestForm(const RobotomyRequestForm& other);
|
RobotomyRequestForm(const RobotomyRequestForm& other);
|
||||||
RobotomyRequestForm& operator=(const RobotomyRequestForm& other);
|
RobotomyRequestForm& operator=(const RobotomyRequestForm& other);
|
||||||
|
|||||||
@ -6,12 +6,17 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:54:52 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:54:52 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 16:33:23 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:05:29 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "ShrubberyCreationForm.hpp"
|
#include "ShrubberyCreationForm.hpp"
|
||||||
|
|
||||||
|
ShrubberyCreationForm::ShrubberyCreationForm()
|
||||||
|
{
|
||||||
|
std::cout << GREEN << "ShrubberyCreationForm default constructor called!" << RESET << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
ShrubberyCreationForm::ShrubberyCreationForm(const std::string& target)
|
ShrubberyCreationForm::ShrubberyCreationForm(const std::string& target)
|
||||||
: AForm("ShrubberyCreationForm", 145, 137), target(target)
|
: AForm("ShrubberyCreationForm", 145, 137), target(target)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/20 16:41:49 by fgras-ca #+# #+# */
|
/* Created: 2024/02/20 16:41:49 by fgras-ca #+# #+# */
|
||||||
/* Updated: 2024/02/22 15:35:33 by fgras-ca ### ########.fr */
|
/* Updated: 2024/03/11 15:04:32 by fgras-ca ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ private:
|
|||||||
std::string target;
|
std::string target;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
ShrubberyCreationForm();
|
||||||
ShrubberyCreationForm(const std::string& target);
|
ShrubberyCreationForm(const std::string& target);
|
||||||
ShrubberyCreationForm(const ShrubberyCreationForm& other);
|
ShrubberyCreationForm(const ShrubberyCreationForm& other);
|
||||||
ShrubberyCreationForm& operator=(const ShrubberyCreationForm& other);
|
ShrubberyCreationForm& operator=(const ShrubberyCreationForm& other);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user