1
0
This repository has been archived on 2025-01-26. You can view files and clone it, but cannot push or open issues or pull requests.

39 lines
1.4 KiB
C++
Raw Normal View History

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* dog.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/01 20:05:21 by adjoly #+# #+# */
2024-12-04 14:01:52 +01:00
/* Updated: 2024/12/04 14:01:24 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "dog.hpp"
Dog::Dog(void) : Animal("Dog"){
log("", "Dog", "", "construtor called");
}
Dog::~Dog(void) {
log("", "Dog", "", "destructor called");
}
Dog::Dog(const Dog &cpy) : Animal("Dog"){
log("", "Dog", _type, "copy construtor called");
*this = cpy;
}
Dog &Dog::operator=(const Dog &cpy) {
log("🟰", "Dog", "", "copy assignment construtor called");
if (this != &cpy) {
this->_type = cpy._type;
}
return (*this);
}
void Dog::makeSound(void) const {
log("🔊", "Dog", "", "woof");
}