Fixed.class.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* Fixed.class.cpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@gmail.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/07/16 16:07:34 by bchanot #+# #+# */
  9. /* Updated: 2025/07/16 16:43:03 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "Fixed.class.hpp"
  13. #include <iostream>
  14. Fixed::Fixed(void) : _value(0), _integer(8) {
  15. std::cout << "Default constructor called" << std::endl;
  16. return ;
  17. }
  18. Fixed::Fixed(Fixed const &src) {
  19. *this = src;
  20. std::cout << "Copy constructor called" << std::endl;
  21. return ;
  22. }
  23. Fixed::~Fixed(void) {
  24. std::cout << "Destructor called" << std::endl;
  25. return ;
  26. }
  27. int getRawBits(void) const {
  28. return this->_value;
  29. }
  30. void setRawBits(int const raw)
  31. Fixed &operator=(Fixed const &rhs);