Digit - Richard-Degenne/MathParser GitHub Wiki

Class overview

A digit is the primary component for every numeric object.

Summary

Constants

Enumerated type digit

  • ERROR -1
  • ZERO 0
  • ONE 1
  • TWO 2
  • THREE 3
  • FOUR 4
  • FIVE 5
  • SIX 6
  • SEVEN 7
  • EIGHT 8
  • NINE 9

Attributes

  • digit value
  • bool overflow

Private methods

  • void setOverflow()
  • void incrementValue()
  • void decrementValue()

Public methods

Constructors

  • Digit()
  • Digit(digit)
  • Digit(Digit const&)
  • Digit(int const)

Getters

  • digit getValue() const
  • bool getOverflow() const

Setters

  • void setValue(digit)
  • void resetOverflow()

Other methods

  • void printTo(std::ostream&) const
  • bool isEqualTo(Digit const&) const
  • bool isGreaterThan(Digit const&) const

Short operators overload

  • Digit operator= (Digit const&)
  • Digit operator+=(Digit const&)
  • Digit operator-=(Digit const&)
  • Digit operator*=(Digit const&)
  • Digit operator/=(Digit const&)
  • Digit operator%=(Digit const&)

Related non-member functions

Long operators overload

  • Digit operator+(Digit const&, Digit const&)
  • Digit operator-(Digit const&, Digit const&)
  • Digit operator*(Digit const&, Digit const&)
  • Digit operator/(Digit const&, Digit const&)
  • Digit operator%(Digit const&, Digit const&)

Relational operators overload

  • bool operator==(Digit const&, Digit const&)
  • bool operator!=(Digit const&, Digit const&)
  • bool operator> (Digit const&, Digit const&)
  • bool operator>=(Digit const&, Digit const&)
  • bool operator< (Digit const&, Digit const&)
  • bool operator<=(Digit const&, Digit const&)

Stream operators overload

  • std::ostream& operator<<(std::ostream&, Digit)