Changeset 10339 for trunk/FACT++
- Timestamp:
- 04/10/11 10:10:36 (14 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ServiceList.cc
r10330 r10339 607 607 //! ostream to which the output is send. 608 608 // 609 void ServiceList::PrintDescription(std::ostream &out) const 610 { 609 int ServiceList::PrintDescription(std::ostream &out, const string &serv, const string &service) const 610 { 611 int rc = 0; 611 612 for (ServiceMap::const_iterator i=fServiceList.begin(); i!=fServiceList.end(); i++) 612 613 { 613 614 const string &server = i->first; 615 616 if (!serv.empty() && server!=serv) 617 continue; 618 619 out << "" << kRed << "----- " << server << " -----" << endl; 620 614 621 const vector<string> &lst = i->second; 615 616 out << "" << kRed << "----- " << server << " -----" << endl;617 618 622 for (vector<string>::const_iterator s=lst.begin(); s!=lst.end(); s++) 619 623 { 624 if (!service.empty() && *s!=service) 625 continue; 626 627 rc++; 628 620 629 out << " " << *s; 621 630 … … 655 664 out << endl; 656 665 } 666 667 return rc; 657 668 } 658 669 -
trunk/FACT++/src/ServiceList.h
r10306 r10339 77 77 void PrintServerList(std::ostream &out) const; 78 78 void PrintServiceList(std::ostream &out) const; 79 void PrintDescription(std::ostream &out) const;79 int PrintDescription(std::ostream &out, const std::string &serv="", const std::string &svc="") const; 80 80 void PrintServerList() const { PrintServerList(wout); } 81 81 void PrintServiceList() const { PrintServiceList(wout); } 82 void PrintDescription() const { PrintDescription(wout); }82 int PrintDescription(const std::string &serv="", const std::string &svc="") const { return PrintDescription(wout, serv, svc); } 83 83 84 84 static void DumpServiceList(std::ostream &out);
Note:
See TracChangeset
for help on using the changeset viewer.