「✨」 feat(Ex00): working
This commit is contained in:
46
ex00/WrongAnimal.cpp
Normal file
46
ex00/WrongAnimal.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
Reference in New Issue
Block a user