Operator << on Form prints all the information
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2026/02/21 12:11:18 by aortigos #+# #+# */
|
/* Created: 2026/02/21 12:11:18 by aortigos #+# #+# */
|
||||||
/* Updated: 2026/03/16 10:10:59 by aortigos ### ########.fr */
|
/* Updated: 2026/03/16 10:15:19 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -106,8 +106,8 @@ std::ostream& operator<<(std::ostream &os, const Form &form)
|
|||||||
}
|
}
|
||||||
|
|
||||||
os << form.getName() << isItSigned
|
os << form.getName() << isItSigned
|
||||||
<< "Grade to execute: " << this->gradeToExecute
|
<< "Grade to sign: " << form.getGradeToSign() << ". "
|
||||||
<< "Grade to sign: " << this->gradeToSign;
|
<< "Grade to execute: " << form.getGradeToExecute() << ".";
|
||||||
return (os);
|
return (os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2026/02/21 12:12:17 by aortigos #+# #+# */
|
/* Created: 2026/02/21 12:12:17 by aortigos #+# #+# */
|
||||||
/* Updated: 2026/03/16 10:11:21 by aortigos ### ########.fr */
|
/* Updated: 2026/03/16 10:15:19 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -107,8 +107,8 @@ std::ostream& operator<<(std::ostream &os, const AForm &form)
|
|||||||
}
|
}
|
||||||
|
|
||||||
os << form.getName() << isItSigned
|
os << form.getName() << isItSigned
|
||||||
<< "Grade to execute: " << this->gradeToExecute
|
<< "Grade to sign: " << form.getGradeToSign() << ". "
|
||||||
<< "Grade to sign: " << this->gradeToSign;
|
<< "Grade to execute: " << form.getGradeToExecute() << ".";
|
||||||
return (os);
|
return (os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2026/02/21 12:13:40 by aortigos #+# #+# */
|
/* Created: 2026/02/21 12:13:40 by aortigos #+# #+# */
|
||||||
/* Updated: 2026/03/16 10:11:30 by aortigos ### ########.fr */
|
/* Updated: 2026/03/16 10:15:19 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -107,8 +107,8 @@ std::ostream& operator<<(std::ostream &os, const AForm &form)
|
|||||||
}
|
}
|
||||||
|
|
||||||
os << form.getName() << isItSigned
|
os << form.getName() << isItSigned
|
||||||
<< "Grade to execute: " << this->gradeToExecute
|
<< "Grade to sign: " << form.getGradeToSign() << ". "
|
||||||
<< "Grade to sign: " << this->gradeToSign;
|
<< "Grade to execute: " << form.getGradeToExecute() << ".";
|
||||||
return (os);
|
return (os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2026/02/21 12:14:52 by aortigos #+# #+# */
|
/* Created: 2026/02/21 12:14:52 by aortigos #+# #+# */
|
||||||
/* Updated: 2026/02/21 12:46:24 by aortigos ### ########.fr */
|
/* Updated: 2026/03/16 10:13:09 by aortigos ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -30,6 +30,7 @@ int main()
|
|||||||
try {
|
try {
|
||||||
AForm* form = intern.makeForm("presidential pardon", "home");
|
AForm* form = intern.makeForm("presidential pardon", "home");
|
||||||
|
|
||||||
|
std::cout << *form << std::endl;
|
||||||
angel.executeForm(*form);
|
angel.executeForm(*form);
|
||||||
angel.signForm(*form);
|
angel.signForm(*form);
|
||||||
angel.executeForm(*form);
|
angel.executeForm(*form);
|
||||||
|
|||||||
Reference in New Issue
Block a user