aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex00/Peon.cpp
blob: 8388dc9f2ede1ce3b292916fced469dfea2d2492 (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
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   Peon.cpp                                           :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/13 20:53:16 by charles           #+#    #+#             */
/*   Updated: 2020/11/12 13:01:42 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) {}

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

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