FACT++  1.0
int DimServiceInfoList::IsCommand ( const std::string &  server,
const std::string &  service 
) const

Returns whether the given service on the given server is a command or not.

Parameters
serverServer name to look for
serviceThe service name to look for
Returns
1 if it is a command, 0 if it is a service, -1 if the service was not found on the server, -2 if the server was not found.

Definition at line 480 of file DimServiceInfoList.cc.

References t.

Referenced by DimServiceInfoListImp::IsCommand(), and ~DimServiceInfoList().

481 {
482  const ServiceList::const_iterator s = fServiceList.find(server);
483  if (s==fServiceList.end())
484  return -2;
485 
486  const TypeList &list = s->second.first;
487 
488  const TypeList::const_iterator t = list.find(service);
489  if (t==list.end())
490  return -1;
491 
492  return t->second.second;
493 }
std::map< const std::string, ServiceType > TypeList
ServiceList fServiceList
A map storing the service description to retrieve all informations.
TT t
Definition: test_client.c:26

+ Here is the caller graph for this function: