[Positioning] Add Result::in_which_area()
This commit is contained in:
parent
4675ac9f48
commit
8295666178
|
@ -203,6 +203,8 @@ $(OBJ_DIR)/calibrationrequest.o: \
|
|||
$(OBJ_DIR)/referencepoint.o \
|
||||
$(OBJ_DIR)/direction.o
|
||||
$(OBJ_DIR)/result.o: \
|
||||
$(OBJ_DIR)/stock.o \
|
||||
$(OBJ_DIR)/area.o \
|
||||
$(OBJ_DIR)/request.o
|
||||
$(OBJ_DIR)/resultlist.o: \
|
||||
$(OBJ_DIR)/result.o
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "result.hh"
|
||||
#include "request.hh"
|
||||
#include "area.hh"
|
||||
#include "stock.hh"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
@ -21,6 +23,20 @@ Result::Result(const Request *_request,
|
|||
|
||||
|
||||
|
||||
/* *** Read accessors *** */
|
||||
|
||||
|
||||
string Result::in_which_area() const
|
||||
{
|
||||
const Area *area = Stock::in_which_area_is(position) ;
|
||||
if (area == NULL)
|
||||
return "" ;
|
||||
|
||||
return area->get_name() ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* *** Write accessors *** */
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ public:
|
|||
const std::string& get_algorithm(void) const ;
|
||||
const Point3D& get_position(void) const ;
|
||||
float get_error(void) const ;
|
||||
std::string in_which_area(void) const ;
|
||||
//@}
|
||||
|
||||
/** @name Write accessors */
|
||||
|
|
Loading…
Reference in New Issue