/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Fixed.class.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/07/16 16:07:34 by bchanot #+# #+# */ /* Updated: 2025/07/17 15:33:54 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "Fixed.class.hpp" #include Fixed::Fixed(void) : _value(0), _integer(8) { std::cout << "Default constructor called" << std::endl; return ; } Fixed::Fixed(Fixed const &src) : _integer(8) { *this = src; std::cout << "Copy constructor called" << std::endl; return ; } Fixed::~Fixed(void) { std::cout << "Destructor called" << std::endl; return ; } int Fixed::getRawBits(void) const { std::cout << "getRawBits member function called" << std::endl; return this->_value; } void Fixed::setRawBits(int const raw) { std::cout << "setRawBits member function called" << std::endl; this->_value = raw; return ; } Fixed &Fixed::operator=(Fixed const &rhs) { std::cout << "Copy assignment operator called" << std::endl; this->_value = rhs.getRawBits(); return *this; }