diff --git a/owlps-positioning/src/stock.cc b/owlps-positioning/src/stock.cc index 9ee4dab..9fc3407 100644 --- a/owlps-positioning/src/stock.cc +++ b/owlps-positioning/src/stock.cc @@ -342,6 +342,14 @@ bool Stock::is_ap_coordinate(const Point3D &coord) /* *** ReferencePoint operations *** */ +bool Stock::reference_point_exists(const ReferencePoint &point) +{ + unordered_set::const_iterator i = + reference_points.find(point) ; + return i != reference_points.end() ; +} + + /** * @param point Coordinates of the wanted ReferencePoint. * @return The ReferencePoint at the given coordinates, if found. diff --git a/owlps-positioning/src/stock.hh b/owlps-positioning/src/stock.hh index 8c4cac7..bfd6c25 100644 --- a/owlps-positioning/src/stock.hh +++ b/owlps-positioning/src/stock.hh @@ -122,6 +122,8 @@ public: //@{ /// Returns the number of reference points static unsigned int nb_reference_points(void) ; + /// Verify the existence of a reference point at the given coordinates + static bool reference_point_exists(const ReferencePoint &point) ; /// Reads the ReferencePoint at the given coordinates static const ReferencePoint& get_reference_point(const ReferencePoint &point) ;