FACT++  1.0
std::vector< Description > DimServiceInfoList::GetDescription ( const std::string &  server,
const std::string &  service 
) const

Returns a list of all descriptions for the given service on the given server. Service in this context can also be a command.

Parameters
serverServer name to look for
serviceService/command name to look for
Returns
a vector<Description> which contains all argument descriptions for the given service or command. The first entry contains the name and the general description for the given service. If the server or service was not found an empty vector is returned.

Definition at line 388 of file DimServiceInfoList.cc.

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

389 {
390  const ServiceList::const_iterator s = fServiceList.find(server);
391  if (s==fServiceList.end())
392  return vector<Description>();
393 
394  const DescriptionList &descs = s->second.second;
395 
396  const DescriptionList::const_iterator d = descs.find(service);
397  if (d==descs.end())
398  return vector<Description>();
399 
400  vector<Description> vec;
401  vec.push_back(Description(service, d->second.first));
402  vec.insert(vec.end(), d->second.second.begin(), d->second.second.end());
403 
404  return vec;
405 }
ServiceList fServiceList
A map storing the service description to retrieve all informations.
std::map< const std::string, std::pair< std::string, std::vector< Description > > > DescriptionList
A struct which stores a name, a unit and a comment.
Definition: Description.h:7

+ Here is the caller graph for this function: