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