buysell.cpp 610 B

123456789101112131415161718192021
  1. #include "buysell.h"
  2. bool buysell::operator==(const buysell &rhs) const {
  3. return ((foe[0] == rhs.foe[0]) && (foe[1] == rhs.foe[1]) &&
  4. (foe[2] == rhs.foe[2]));
  5. }
  6. std::ostream &operator<<(std::ostream &os, const buysell &bs) {
  7. os << bs.foe[0] << bs.foe[1] << bs.foe[2];
  8. return os;
  9. }
  10. bool buysell_text::operator==(const buysell_text &rhs) const {
  11. return ((txt[0] == rhs.txt[0]) && (txt[1] == rhs.txt[1]) &&
  12. (txt[2] == rhs.txt[2]));
  13. }
  14. std::ostream &operator<<(std::ostream &os, const buysell_text &bst) {
  15. os << '"' << bst.txt[0] << bst.txt[1] << bst.txt[2] << '"';
  16. return os;
  17. }