Changeset 10306
- Timestamp:
- 04/07/11 15:42:46 (14 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ServiceList.cc
r10298 r10306 367 367 string ServiceList::GetFormat(const string &service) const 368 368 { 369 StringMap::const_iterator i = fFormatList.find(service);369 const StringMap::const_iterator i = fFormatList.find(service); 370 370 return i==fFormatList.end() ? "" : i->second; 371 371 } … … 388 388 { 389 389 return GetFormat(server+"/"+name); 390 } 391 392 // -------------------------------------------------------------------------- 393 // 394 //! Get the Description vector of a command or service 395 //! 396 //! @param service 397 //! full qualified service name, e.g. SERVER/EXIT 398 //! 399 //! @returns 400 //! a vector of Description objects corresponding to the arguments 401 //! 402 // 403 vector<Description> ServiceList::GetDescriptions(const string &service) const 404 { 405 const DescriptionMap::const_iterator i = fDescriptionList.find(service); 406 return i==fDescriptionList.end() ? vector<Description>() : i->second; 407 } 408 409 // -------------------------------------------------------------------------- 410 // 411 //! Get the Description vector of a command or service 412 //! 413 //! @param server 414 //! the server name, e.g. SERVER 415 //! 416 //! @param name 417 //! the service name, e.g. EXIT 418 //! 419 //! @returns 420 //! a vector of Description objects corresponding to the arguments 421 // 422 vector<Description> ServiceList::GetDescriptions(const string &server, const string &name) const 423 { 424 return GetDescriptions(server+"/"+name); 425 } 426 427 // -------------------------------------------------------------------------- 428 // 429 //! Get a description describing the given command or service if available. 430 //! 431 //! @param service 432 //! full qualified service name, e.g. SERVER/EXIT 433 //! 434 //! @returns 435 //! string with the stored comment 436 //! 437 // 438 string ServiceList::GetComment(const string &service) const 439 { 440 const StringMap::const_iterator i = fDescriptionMap.find(service); 441 return i==fDescriptionMap.end() ? "" : i->second; 442 } 443 444 // -------------------------------------------------------------------------- 445 // 446 //! Get a description describing the given command or service if available. 447 //! 448 //! @param server 449 //! the server name, e.g. SERVER 450 //! 451 //! @param name 452 //! the service name, e.g. EXIT 453 //! 454 //! @returns 455 //! string with the stored comment 456 // 457 string ServiceList::GetComment(const string &server, const string &name) const 458 { 459 return GetComment(server+"/"+name); 390 460 } 391 461 -
trunk/FACT++/src/ServiceList.h
r10298 r10306 69 69 std::string GetFormat(const std::string &service) const; 70 70 71 std::string GetComment(const std::string &server, const std::string &name) const; 72 std::string GetComment(const std::string &service) const; 73 74 std::vector<Description> GetDescriptions(const std::string &server, const std::string &name) const; 75 std::vector<Description> GetDescriptions(const std::string &service) const; 76 71 77 void PrintServerList(std::ostream &out) const; 72 78 void PrintServiceList(std::ostream &out) const;
Note:
See TracChangeset
for help on using the changeset viewer.