MCPcopy Create free account
hub / github.com/Kitware/CMake / PrintNames

Method PrintNames

Source/cmDocumentation.cxx:510–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510void cmDocumentation::PrintNames(std::ostream& os, std::string const& pattern)
511{
512 std::vector<std::string> files;
513 this->GlobHelp(files, pattern);
514 std::vector<std::string> names;
515 for (std::string const& f : files) {
516 std::string line;
517 cmsys::ifstream fin(f.c_str());
518 while (fin && cmSystemTools::GetLineFromStream(fin, line)) {
519 if (!line.empty() && (cmsysString_isalnum(line[0]) || line[0] == '<')) {
520 names.push_back(line);
521 break;
522 }
523 }
524 }
525 std::sort(names.begin(), names.end());
526 for (std::string const& n : names) {
527 os << n << '\n';
528 }
529}
530
531bool cmDocumentation::PrintFiles(std::ostream& os, std::string const& pattern)
532{

Callers 5

PrintHelpListManualsMethod · 0.95
PrintHelpListCommandsMethod · 0.95
PrintHelpListPoliciesMethod · 0.95

Calls 6

GlobHelpMethod · 0.95
c_strMethod · 0.80
push_backMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected