ENH: improve output formatting for usage information

- generalize output text wrapping, use for usage notes

- add -help-man option for generating manpage content for any OpenFOAM
  application or solver.

  bin/tools/foamCreateManpage as helper
This commit is contained in:
Mark Olesen
2018-11-21 19:55:28 +01:00
parent 6dcc46b187
commit 5187aa13aa
9 changed files with 565 additions and 94 deletions

View File

@ -49,6 +49,9 @@ SourceFiles
namespace Foam
{
// Forward declarations
class OSstream;
/*---------------------------------------------------------------------------*\
Namespace stringOps Declaration
\*---------------------------------------------------------------------------*/
@ -382,6 +385,22 @@ namespace stringOps
const StringType& str
);
//- Output string with text wrapping.
// Always includes a trailing newline, unless the string itself is empty.
//
// \param os the output stream
// \param str the text to be output
// \param width the max-width before wrapping
// \param indent indentation for continued lines
// \param escape escape any backslashes on output
void writeWrapped
(
OSstream& os,
const std::string& str,
const std::string::size_type width,
const std::string::size_type indent = 0,
const bool escape = false
);
} // End namespace stringOps