owlps/owlps-positioning/src/result.cc

42 lines
672 B
C++
Raw Normal View History

2010-03-03 16:06:41 +01:00
#include "result.hh"
#include "request.hh"
2010-03-03 16:06:41 +01:00
/* *** Operators *** */
const Result& Result::operator=(const Result &source)
{
if (this == &source)
return *this ;
position = source.position ;
request = source.request ;
return *this ;
}
bool Result::operator==(const Result &source)
{
return
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 result is: " ;
else
os
<< "For the following request: "
<< *(r.request)
<< "\nThe result is: " ;
os << r.position ;
return os ;
}