/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Brain.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/18 17:12:31 by bchanot #+# #+# */ /* Updated: 2025/12/18 18:25:05 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "Brain.hpp" /* ** ------------------------------- CONSTRUCTOR -------------------------------- */ Brain::Brain() { std::cout << "Creating a brain" << std::endl; } Brain::Brain( const Brain & src ) : _ideas(src._ideas) { std::cout << "Copying a brain" << std::endl; } /* ** -------------------------------- DESTRUCTOR -------------------------------- */ Brain::~Brain() { std::cout << "Deleting a brain.." << std::endl; } /* ** --------------------------------- OVERLOAD --------------------------------- */ Brain & Brain::operator=( Brain const & rhs ) { if ( this != &rhs ) { *this->_ideas = *rhs._ideas; } return *this; } std::ostream & operator<<( std::ostream & o, Brain const & i ) { (void)i; //o << "Value = " << i.getValue(); return o; } /* ** --------------------------------- METHODS ---------------------------------- */ /* ** --------------------------------- ACCESSOR --------------------------------- */ /* ************************************************************************** */