MCPcopy Create free account
hub / github.com/PDAL/PDAL / dump2

Method dump2

pdal/util/ProgramArgs.hpp:1402–1421  ·  view source on GitHub ↗

Write a verbose description of arguments to an output stream. Each argument is on its own line. The argument's description follows on subsequent lines. \param out Stream to which output should be written. \param nameIndent Number of characters to indent argument lines. \param descripIndent Number of characters to indent description lines. \param totalWidth

Source from the content-addressed store, hash-verified

1400
1401 */
1402 void dump2(std::ostream& out, size_t nameIndent, size_t descripIndent,
1403 size_t totalWidth) const
1404 {
1405 size_t width = totalWidth - descripIndent;
1406 for (auto ai = m_args.begin(); ai != m_args.end(); ++ai)
1407 {
1408 Arg *a = ai->get();
1409 out << std::string(nameIndent, ' ') << a->longname();
1410 if (a->defaultProvided())
1411 out << " [" << a->defaultVal() << "]";
1412 out << std::endl;
1413 std::vector<std::string> descrip =
1414 Utils::wordWrap(a->description(), width);
1415 if (descrip.empty())
1416 descrip.push_back("<no description available>");
1417 for (std::string& s : descrip)
1418 out << std::string(descripIndent, ' ') << s << std::endl;
1419 out << std::endl;
1420 }
1421 }
1422
1423 /**
1424 Write a JSON array of arguments to an output stream.

Callers 1

outputOptionsMethod · 0.80

Calls 8

longnameMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
defaultProvidedMethod · 0.45
defaultValMethod · 0.45
descriptionMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected