FACT++  1.0
bool ServiceList::HasService ( const std::string &  server,
const std::string &  service 
) const

Checks if a given service is existing.

Parameters
serverName of a server, e.g. DIS_DNS
serviceName of a service, e.g. EXIT
Returns
true if the service is found in fServiceList, false otherwise.

Definition at line 491 of file ServiceList.cc.

References end(), and fServiceList.

Referenced by HasService(), SendDimCommand(), and SetHandler().

492 {
493  ServiceMap::const_iterator v = fServiceList.find(server);
494  if (v==end())
495  return false;
496 
497  const vector<string> &w = v->second;
498  return find(w.begin(), w.end(), service)!=w.end();
499 }
ServiceMap fServiceList
A map storing server names and a DimInfo for their SERVICE_LIST.
Definition: ServiceList.h:30
ServiceMap::const_iterator end() const
Definition: ServiceList.h:63

+ Here is the call graph for this function:

+ Here is the caller graph for this function: