Print the full available documentation (description) of all available services or comments to the the given stream.
- Parameters
-
out | ostream to which the output is send. |
iscmd | true if all commands should be printed, false for services. |
serv | if a server is given, only the information for this server is printed |
service | if a service is given, only information for this service is printed |
- Returns
- the number of descriptions found
Definition at line 516 of file DimServiceInfoList.cc.
References i, if(), kBlue, kGreen, kRed, kReset, kYellow, and t.
Referenced by DimServiceInfoListImp::PrintDescription(), and ~DimServiceInfoList().
521 const string &server =
i->first;
526 out <<
kRed <<
"----- " << server <<
" -----" << endl;
531 for (TypeList::const_iterator
t=types.begin();
t!=types.end();
t++)
533 if (!service.empty() &&
t->first!=service)
536 if (
t->second.second!=iscmd)
541 out <<
" " <<
t->first;
544 const string fmt =
t->second.first;
546 out <<
'[' << fmt <<
']';
548 const DescriptionList::const_iterator d = descs.find(
t->first);
555 const string comment = d->second.first;
556 const vector<Description> &v = d->second.second;
558 for (vector<Description>::const_iterator j=v.begin(); j!=v.end(); j++)
559 out <<
" <" << j->name <<
">";
562 if (!comment.empty())
563 out <<
" " << comment << endl;
565 for (vector<Description>::const_iterator j=v.begin(); j!=v.end(); j++)
567 out <<
" " <<
kGreen << j->name;
568 if (!j->comment.empty())
570 if (!j->unit.empty())
571 out <<
kYellow <<
" [" << j->unit <<
"]";
std::map< const std::string, ServiceType > TypeList
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