Brain.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* Brain.cpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/12/18 17:12:31 by bchanot #+# #+# */
  9. /* Updated: 2025/12/18 18:25:05 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "Brain.hpp"
  13. /*
  14. ** ------------------------------- CONSTRUCTOR --------------------------------
  15. */
  16. Brain::Brain()
  17. {
  18. std::cout << "Creating a brain" << std::endl;
  19. }
  20. Brain::Brain( const Brain & src ) : _ideas(src._ideas)
  21. {
  22. std::cout << "Copying a brain" << std::endl;
  23. }
  24. /*
  25. ** -------------------------------- DESTRUCTOR --------------------------------
  26. */
  27. Brain::~Brain()
  28. {
  29. std::cout << "Deleting a brain.." << std::endl;
  30. }
  31. /*
  32. ** --------------------------------- OVERLOAD ---------------------------------
  33. */
  34. Brain & Brain::operator=( Brain const & rhs )
  35. {
  36. if ( this != &rhs )
  37. {
  38. *this->_ideas = *rhs._ideas;
  39. }
  40. return *this;
  41. }
  42. std::ostream & operator<<( std::ostream & o, Brain const & i )
  43. {
  44. (void)i;
  45. //o << "Value = " << i.getValue();
  46. return o;
  47. }
  48. /*
  49. ** --------------------------------- METHODS ----------------------------------
  50. */
  51. /*
  52. ** --------------------------------- ACCESSOR ---------------------------------
  53. */
  54. /* ************************************************************************** */