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

Method PrintRequestedDocumentation

Source/cmDocumentation.cxx:200–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
201{
202 int count = 0;
203 bool result = true;
204
205 // Loop over requested documentation types.
206 for (RequestedHelpItem const& rhi : this->RequestedHelpItems) {
207 this->CurrentArgument = rhi.Argument;
208 // If a file name was given, use it. Otherwise, default to the
209 // given stream.
210 cmsys::ofstream fout;
211 std::ostream* s = &os;
212 if (!rhi.Filename.empty()) {
213 fout.open(rhi.Filename.c_str());
214 s = &fout;
215 } else if (++count > 1) {
216 os << "\n\n";
217 }
218
219 // Print this documentation type to the stream.
220 if (!this->PrintDocumentation(rhi.HelpType, *s) || s->fail()) {
221 result = false;
222 }
223 }
224 return result;
225}
226
227void cmDocumentation::WarnFormFromFilename(
228 cmDocumentation::RequestedHelpItem& request, bool& result)

Callers 5

do_cmakeFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 4

PrintDocumentationMethod · 0.95
c_strMethod · 0.80
emptyMethod · 0.45
openMethod · 0.45

Tested by 1

mainFunction · 0.64