43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
/* ************************************************************************** */
|
||
/* */
|
||
/* ::: :::::::: */
|
||
/* AAnimal.cpp :+: :+: :+: */
|
||
/* +:+ +:+ +:+ */
|
||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||
/* +#+#+#+#+#+ +#+ */
|
||
/* Created: 2024/12/01 19:14:27 by adjoly #+# #+# */
|
||
/* Updated: 2024/12/06 16:23:53 by adjoly ### ########.fr */
|
||
/* */
|
||
/* ************************************************************************** */
|
||
|
||
#include "AAnimal.hpp"
|
||
|
||
AAnimal::AAnimal(void) {
|
||
log("➕", "AAnimal", "", "construtor called");
|
||
}
|
||
|
||
AAnimal::~AAnimal() {
|
||
log("➖", "AAnimal", _type, "destructor called");
|
||
}
|
||
|
||
AAnimal::AAnimal(std::string type) : _type(type) {
|
||
log("➕", "AAnimal", type, "construtor called");
|
||
}
|
||
|
||
AAnimal::AAnimal(const AAnimal &cpy) {
|
||
log("➕", "AAnimal", _type, "copy construtor called");
|
||
*this = cpy;
|
||
}
|
||
|
||
AAnimal &AAnimal::operator=(const AAnimal &cpy) {
|
||
log("🟰", "AAnimal", _type, "copy assignment construtor called");
|
||
if (this != &cpy) {
|
||
_type = cpy._type;
|
||
}
|
||
return (*this);
|
||
}
|
||
|
||
std::string AAnimal::getType(void) const {
|
||
return (_type);
|
||
}
|