FACT++  1.0
vector< string > DimServiceInfoList::GetServiceList ( const std::string &  server,
bool  iscmd = false 
) const

Returns a list of all services available for the given server. Depending on iscmd either only services or only commands are returned.

Parameters
serverserver for which the list should be returned
iscmdtrue if only commands should be returned, false for services
Returns
a vector<string> which contains all the service or command names for the given server. The names returned are always SERVER/SERVICE If the server was not fund an empty vector is returned.

Definition at line 328 of file DimServiceInfoList.cc.

References i.

329 {
330  const ServiceList::const_iterator m = fServiceList.find(server);
331  if (m==fServiceList.end())
332  return vector<string>();
333 
334  const TypeList &list = m->second.first;
335 
336  vector<string> vec;
337  for (TypeList::const_iterator i=list.begin(); i!=list.end(); i++)
338  if (i->second.second==iscmd)
339  vec.push_back(server+'/'+i->first);
340 
341  return vec;
342 }
std::map< const std::string, ServiceType > TypeList
ServiceList fServiceList
A map storing the service description to retrieve all informations.
int i
Definition: db_dim_client.c:21