aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex00/Peon.cpp
blob: df55b4fed1be3f892023bdc26606643b03a1abff (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
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   Peon.cpp                                           :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/13 20:53:16 by charles           #+#    #+#             */
/*   Updated: 2020/04/13 21:00:23 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "Peon.hpp"

Peon::Peon(std::string name):
    Victim(name)
{
    std::cout << "Zog zog." << std::endl;
}

void Peon::operator=(Peon const& other)
{
    m_name = other.m_name;
}

Peon::Peon(Peon const& other)
    : Victim(other)
{
}

Peon::~Peon()
{
    std::cout << "Bleuark..." << std::endl;
}

void Peon::getPolymorphed() const
{
    std::cout << m_name << " has been turned into a pink pony!" << std::endl;
}