84 lines
1.9 KiB
C++
84 lines
1.9 KiB
C++
|
#ifndef _OWLPS_POSITIONING_CALIBRATIONREQUEST_HH_
|
||
|
#define _OWLPS_POSITIONING_CALIBRATIONREQUEST_HH_
|
||
|
|
||
|
class ReferencePoint ;
|
||
|
|
||
|
#include "request.hh"
|
||
|
|
||
|
/// Represents a calibration Request sent by a mobile
|
||
|
class CalibrationRequest: public Request
|
||
|
{
|
||
|
protected:
|
||
|
/// The reference point the mobile calibrates
|
||
|
ReferencePoint *reference_point ;
|
||
|
|
||
|
public:
|
||
|
CalibrationRequest(void): reference_point(NULL) {}
|
||
|
/// Copy constructor
|
||
|
CalibrationRequest(const CalibrationRequest &source):
|
||
|
Request(source), reference_point(source.reference_point) {}
|
||
|
/// \brief Constructs a CalibrationRequest from a Request and
|
||
|
/// (possibly) a ReferencePoint)
|
||
|
CalibrationRequest(const Request &source,
|
||
|
ReferencePoint *_reference_point = NULL):
|
||
|
Request(source), reference_point(_reference_point) {}
|
||
|
|
||
|
~CalibrationRequest(void) {}
|
||
|
|
||
|
/** @name Read accessors */
|
||
|
//@{
|
||
|
/// #reference_point read accessor
|
||
|
ReferencePoint* get_reference_point(void) const ;
|
||
|
//@}
|
||
|
|
||
|
/** @name Write accessors */
|
||
|
//@{
|
||
|
/// #reference_point write accessor
|
||
|
void set_reference_point(const ReferencePoint *_rp) ;
|
||
|
/// Reinitialises all attributes
|
||
|
void clear(void) ;
|
||
|
//@}
|
||
|
|
||
|
/** @name Operators */
|
||
|
//@{
|
||
|
const CalibrationRequest& operator=(const CalibrationRequest &source) ;
|
||
|
bool operator==(const CalibrationRequest &source) ;
|
||
|
bool operator!=(const CalibrationRequest &source) ;
|
||
|
//@}
|
||
|
} ;
|
||
|
|
||
|
|
||
|
|
||
|
/* *** Read accessors *** */
|
||
|
|
||
|
|
||
|
inline ReferencePoint* CalibrationRequest::get_reference_point(void) const
|
||
|
{
|
||
|
return reference_point ;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
/* *** Write accessors *** */
|
||
|
|
||
|
|
||
|
inline void CalibrationRequest::set_reference_point(
|
||
|
const ReferencePoint *_rp)
|
||
|
{
|
||
|
reference_point = const_cast<ReferencePoint*>(_rp) ;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
/* *** Operators *** */
|
||
|
|
||
|
|
||
|
inline bool CalibrationRequest::operator!=(const CalibrationRequest &source)
|
||
|
{
|
||
|
return !(*this == source) ;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
#endif // _OWLPS_POSITIONING_CALIBRATIONREQUEST_HH_
|