currencygithub.com/castedo/isomon

Name

isomon::money

Synopsis

// In header: </home/castedo/src/isomon/money.hpp>


class money {
public:
  // construct/copy/destruct
  money();
  money(int64_t, int64_t, currency);

  // public member functions
  double value() const;
  currency unit() const;
  int64_t total_minors() const;
  money & operator+=(money);
  money & operator-=(money);
  money & operator*=(int32_t);
  money operator-() const;
  money operator+(money) const;
  money operator-(money) const;
  money operator*(int32_t) const;
  bool operator==(money) const;
  bool operator!=(money) const;

  // public static functions
  static money pos_infinity(currency);
  static money neg_infinity(currency);
};

Description

money public construct/copy/destruct

  1. money();
  2. money(int64_t major_units, int64_t minor_units, currency unit);

money public member functions

  1. double value() const;
  2. currency unit() const;
  3. int64_t total_minors() const;
  4. money & operator+=(money rhs);
  5. money & operator-=(money rhs);
  6. money & operator*=(int32_t rhs);
  7. money operator-() const;
  8. money operator+(money rhs) const;
  9. money operator-(money rhs) const;
  10. money operator*(int32_t rhs) const;
  11. bool operator==(money rhs) const;
  12. bool operator!=(money rhs) const;

money public static functions

  1. static money pos_infinity(currency unit);
  2. static money neg_infinity(currency unit);