/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Cat.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/18 16:28:27 by bchanot #+# #+# */ /* Updated: 2025/12/18 16:48:38 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "Cat.hpp" /* ** ------------------------------- CONSTRUCTOR -------------------------------- */ Cat::Cat() : Animal("Cat") { std::cout << "A Cat is born !" << std::endl; } Cat::Cat( const Cat & src ) : Animal(src) { std::cout << "A " << this->type << " is born !" << std::endl; } /* ** -------------------------------- DESTRUCTOR -------------------------------- */ Cat::~Cat() { std::cout << "A " << this->type << "has died ..." << std::endl; } /* ** --------------------------------- OVERLOAD --------------------------------- */ Cat & Cat::operator=( Cat const & rhs ) { (void)rhs; //if ( this != &rhs ) //{ //this->_value = rhs.getValue(); //} return *this; } std::ostream & operator<<( std::ostream & o, Cat const & i ) { (void)i; //o << "Value = " << i.getValue(); return o; } /* ** --------------------------------- METHODS ---------------------------------- */ void Cat::makeSound(void) const { std::cout << "*Miaouuu*" << std::endl; } /* ** --------------------------------- ACCESSOR --------------------------------- */ /* ************************************************************************** */