owlps/owlps-positioning/src/result.hh

65 lines
1.1 KiB
C++
Raw Normal View History

2010-03-03 16:06:41 +01:00
#ifndef _OWLPS_POSITIONING_RESULT_HH_
#define _OWLPS_POSITIONING_RESULT_HH_
class Request ;
#include "point3d.hh"
/// Represents a result computed by a positioning algorithm
class Result
{
protected:
Point3D position ;
Request *request ;
public:
Result(const Request *_request = NULL):
request(const_cast<Request*>(_request)) {}
Result(const Request *_request, const Point3D &_position):
position(_position), request(const_cast<Request*>(_request)) {}
~Result(void) {}
/** @name Read accessors */
//@{
const Point3D& get_position(void) ;
const Request* get_request(void) ;
//@}
/** @name Operators */
//@{
const Result& operator=(const Result &source) ;
bool operator==(const Result &source) ;
bool operator!=(const Result &source) ;
//@}
} ;
/* *** Read accessors *** */
inline const Point3D& Result::get_position()
{
return position ;
}
inline const Request* Result::get_request()
{
return request ;
}
/* *** Operators *** */
inline bool Result::operator!=(const Result &source)
{
return !(*this == source) ;
}
#endif // _OWLPS_POSITIONING_RESULT_HH_