blob: a3c2b4e1d3f682545cc9da24849bf7904314afe1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Peon.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/13 20:53:16 by charles #+# #+# */
/* Updated: 2020/12/11 10:17:35 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "Peon.hpp"
Peon::Peon(std::string const& name) : Victim(name)
{
std::cout << "Zog zog." << std::endl;
}
Peon& Peon::operator=(Peon const& other)
{
Victim::operator=(other);
return *this;
}
Peon::Peon(Peon const& other) : Victim(other)
{
std::cout << "Zog zog." << std::endl;
}
Peon::~Peon()
{
std::cout << "Bleuark..." << std::endl;
}
void Peon::getPolymorphed() const
{
std::cout << m_name << " has been turned into a pink pony!" << std::endl;
}
/************************************************************************************/
Rat::Rat(std::string const& name) : Victim(name)
{
std::cout << "Rats rats, everywhere you look, everywhere you turn there is rats." << std::endl;
}
Rat& Rat::operator=(Rat const& other)
{
Victim::operator=(other);
return *this;
}
Rat::Rat(Rat const& other) : Victim(other)
{
std::cout << "Rats rats, everywhere you look, everywhere you turn there is rats." << std::endl;
}
Rat::~Rat()
{
std::cout << "I'll stop runing everything now" << std::endl;
}
void Rat::getPolymorphed() const
{
std::cout << m_name << " has been turned into Ninja" << std::endl;
}
|