#include "result.hh" #include "request.hh" /* *** Operators *** */ const Result& Result::operator=(const Result &source) { if (this == &source) return *this ; algorithm = source.algorithm ; position = source.position ; request = source.request ; return *this ; } bool Result::operator==(const Result &source) const { return algorithm == source.algorithm && position == source.position && request == source.request ; } std::ostream& operator<<(std::ostream &os, const Result &r) { if (r.request == NULL) os << "For an unknown request, the " ; else os << "For the following request: " << *(r.request) << "\nThe " ; os << "result of the algorithm " << r.algorithm << " is: " << r.position ; return os ; }