From 8878bb2390beaf04bc66e400b96eae4dc6337300 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Tue, 19 Jul 2011 18:43:54 +0200 Subject: [PATCH] [Positioning] Add Stock::nb_mobiles() --- owlps-positioning/src/stock.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/owlps-positioning/src/stock.hh b/owlps-positioning/src/stock.hh index db58fd3..ed540b5 100644 --- a/owlps-positioning/src/stock.hh +++ b/owlps-positioning/src/stock.hh @@ -68,6 +68,8 @@ public: /** @name Mobile operations */ //@{ + /// Returns the number of mobiles + static unsigned int nb_mobiles(void) ; /// Reads the Mobile corresponding to a given MAC address static const Mobile& get_mobile(const std::string &mac) ; /// \brief Searches for a Mobile given its MAC address and creates @@ -178,6 +180,12 @@ find_create_waypoint(const Waypoint &point) /* *** Mobile operations *** */ +inline unsigned int Stock::nb_mobiles() +{ + return mobiles.size() ; +} + + /** * If the Mobile corresponding to \em mac does not exist, it is created. * @param mac The MAC address of the Mobile to search for. It must be a