#include "result.hh" #include "request.hh" #include using namespace std ; /* *** Operators *** */ const Result& Result::operator=(const Result &source) { if (this == &source) return *this ; algorithm = source.algorithm ; position = source.position ; return *this ; } bool Result::operator==(const Result &source) const { return algorithm == source.algorithm && position == source.position ; } const string Result::to_csv() const { ostringstream csv_line ; csv_line << algorithm << ';' << position.get_x() << ';' << position.get_y() << ';' << position.get_z() ; return csv_line.str() ; } std::ostream& operator<<(ostream &os, const Result &r) { os << "The result of the algorithm " << r.algorithm << " is: " << r.position ; return os ; }