[Positioning] Add Stock::reference_point_exists()

This commit is contained in:
Matteo Cypriani 2011-07-25 19:23:20 +02:00
parent c11e33fd0b
commit 84acee629c
2 changed files with 10 additions and 0 deletions

View File

@ -342,6 +342,14 @@ bool Stock::is_ap_coordinate(const Point3D &coord)
/* *** ReferencePoint operations *** */
bool Stock::reference_point_exists(const ReferencePoint &point)
{
unordered_set<ReferencePoint>::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.

View File

@ -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) ;