[Positioning] Add Stock::nb_mobiles()

This commit is contained in:
Matteo Cypriani 2011-07-19 18:43:54 +02:00
parent b04cd1cdb8
commit 8878bb2390
1 changed files with 8 additions and 0 deletions

View File

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