47 lines
1.7 KiB
C++
47 lines
1.7 KiB
C++
/* ************************************************************************** */
|
||
/* */
|
||
/* ::: :::::::: */
|
||
/* WrongAnimal.cpp :+: :+: :+: */
|
||
/* +:+ +:+ +:+ */
|
||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||
/* +#+#+#+#+#+ +#+ */
|
||
/* Created: 2024/12/01 19:14:27 by adjoly #+# #+# */
|
||
/* Updated: 2024/12/04 13:56:34 by adjoly ### ########.fr */
|
||
/* */
|
||
/* ************************************************************************** */
|
||
|
||
#include "WrongAnimal.hpp"
|
||
|
||
WrongAnimal::WrongAnimal(void) {
|
||
log("➕", "WrongAnimal", "", "construtor called");
|
||
}
|
||
|
||
WrongAnimal::~WrongAnimal() {
|
||
log("➖", "WrongAnimal", _type, "destructor called");
|
||
}
|
||
|
||
WrongAnimal::WrongAnimal(std::string type) : _type(type) {
|
||
log("➕", "WrongAnimal", type, "construtor called");
|
||
}
|
||
|
||
WrongAnimal::WrongAnimal(const WrongAnimal &cpy) {
|
||
log("➕", "WrongAnimal", _type, "copy construtor called");
|
||
*this = cpy;
|
||
}
|
||
|
||
WrongAnimal &WrongAnimal::operator=(const WrongAnimal &cpy) {
|
||
log("🟰", "WrongAnimal", _type, "copy assignment construtor called");
|
||
if (this != &cpy) {
|
||
_type = cpy._type;
|
||
}
|
||
return (*this);
|
||
}
|
||
|
||
void WrongAnimal::makeSound(void) const {
|
||
log("🔊", "WrongAnimal", "", "making a wrong sound OOOOOOOOOOOOOOOoo");
|
||
}
|
||
|
||
std::string WrongAnimal::getType(void) const {
|
||
return (_type);
|
||
}
|