aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex00/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp04/ex00/main.cpp')
-rw-r--r--cpp04/ex00/main.cpp53
1 files changed, 46 insertions, 7 deletions
diff --git a/cpp04/ex00/main.cpp b/cpp04/ex00/main.cpp
index 9c17e99..8bf96bf 100644
--- a/cpp04/ex00/main.cpp
+++ b/cpp04/ex00/main.cpp
@@ -6,25 +6,64 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/13 20:47:34 by charles #+# #+# */
-/* Updated: 2020/04/13 20:57:19 by charles ### ########.fr */
+/* Updated: 2020/11/12 13:11:26 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
+#include <iostream>
#include "Sorcerer.hpp"
#include "Victim.hpp"
#include "Peon.hpp"
int main()
{
- Sorcerer robert("Robert", "the Magnificent");
+ {
+ std::cout << "==================== SUBJECT MAIN =====================" << std::endl;
+ Sorcerer robert("Robert", "the Magnificent");
+ Victim jim("Jimmy");
+ Peon joe("Joe");
+ std::cout << robert << jim << joe;
+ robert.polymorph(jim);
+ robert.polymorph(joe);
+ }
- Victim jim("Jimmy");
- Peon joe("Joe");
+ std::cout << std::endl;
- std::cout << robert << jim << joe;
+ {
+ std::cout << "==================== SORCERER =====================" << std::endl;
+ Sorcerer s("DidierLeSorcier", "The cunt");
+ Sorcerer s_copied(s);
+ Sorcerer s_assigned("foo", "yep clock");
+ s_assigned = s;
+ std::cout << "Copied: " << s_copied;
+ std::cout << "Assigned: " << s_assigned;
+ }
- robert.polymorph(jim);
- robert.polymorph(joe);
+ std::cout << std::endl;
+
+ {
+ std::cout << "==================== VICTIM =====================" << std::endl;
+ Victim v("Victoire");
+ Victim v_copied(v);
+ Victim v_assigned("bar");
+ v_assigned = v;
+ std::cout << "Copied: " << v_copied;
+ std::cout << "Assigned: " << v_assigned;
+ v.getPolymorphed();
+ }
+
+ std::cout << std::endl;
+
+ {
+ std::cout << "==================== PEON =====================" << std::endl;
+ Peon p("Victoire");
+ Peon p_copied(p);
+ Peon p_assigned("baz");
+ p_assigned = p;
+ std::cout << "Copied: " << p_copied;
+ std::cout << "Assigned: " << p_assigned;
+ p.getPolymorphed();
+ }
return 0;
}