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. |
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 |
Definition at line 615 of file ServiceList.cc.
References fDescriptionList, fDescriptionMap, fServiceList, GetFormat(), i, if(), kBlue, kGreen, kRed, kReset, and kYellow.
Referenced by end().
620 const string &server =
i->first;
625 out <<
kRed <<
"----- " << server <<
" -----" << endl;
627 const vector<string> &lst =
i->second;
628 for (vector<string>::const_iterator s=lst.begin(); s!=lst.end(); s++)
630 if (!service.empty() && *s!=service)
637 const string fmt =
GetFormat(server, *s);
639 out <<
'[' << fmt <<
']';
641 const string svc = server +
'/' + *s;
650 for (vector<Description>::const_iterator j=v->second.begin();
651 j!=v->second.end(); j++)
652 out <<
" <" << j->name <<
">";
657 out <<
" " << d->second << endl;
659 for (vector<Description>::const_iterator j=v->second.begin();
660 j!=v->second.end(); j++)
662 out <<
" " <<
kGreen << j->name;
663 if (!j->comment.empty())
665 if (!j->unit.empty())
666 out <<
kYellow <<
" [" << j->unit <<
"]";
ServiceMap fServiceList
A map storing server names and a DimInfo for their SERVICE_LIST.
std::string GetFormat(const std::string &server, const std::string &name) const
DescriptionMap fDescriptionList
A map storing all descriptions for commands and services.
StringMap fDescriptionMap
A map storing all commands and their format strings.