Gromacs  2021.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::CommandLineHelpWriter Class Reference

#include <gromacs/commandline/cmdlinehelpwriter.h>

Description

Writes help information for Options.

Public Member Functions

 CommandLineHelpWriter (const Options &options)
 Creates an object that writer ascii-formatted help for Options. More...
 
CommandLineHelpWritersetHelpText (const std::string &help)
 Sets the help text to print as description. More...
 
CommandLineHelpWritersetHelpText (const ArrayRef< const char *const > &help)
 Sets the help text to print as description. More...
 
CommandLineHelpWritersetKnownIssues (const ArrayRef< const char *const > &bugs)
 Sets the list of known bugs/limitations. More...
 
CommandLineHelpWritersetKnownIssues (ArrayRef< const std::string > bug)
 Sets text for known bugs. More...
 
void writeHelp (const CommandLineHelpContext &context)
 Writes the help. More...
 

Constructor & Destructor Documentation

gmx::CommandLineHelpWriter::CommandLineHelpWriter ( const Options options)
explicit

Creates an object that writer ascii-formatted help for Options.

Parameters
[in]optionsOptions for which help should be printed.

Member Function Documentation

CommandLineHelpWriter & gmx::CommandLineHelpWriter::setHelpText ( const std::string &  help)

Sets the help text to print as description.

Parameters
[in]helpHelp text to show.
Exceptions
std::bad_allocif out of memory.

If help is empty, or this method is not called, only a list of options is printed. Formatting for the help text is described on Help formatting.

CommandLineHelpWriter & gmx::CommandLineHelpWriter::setHelpText ( const ArrayRef< const char *const > &  help)

Sets the help text to print as description.

Parameters
[in]helpHelp text to show.
Exceptions
std::bad_allocif out of memory.

If help is empty, or this method is not called, only a list of options is printed. Formatting for the help text is described on Help formatting.

CommandLineHelpWriter & gmx::CommandLineHelpWriter::setKnownIssues ( const ArrayRef< const char *const > &  bugs)

Sets the list of known bugs/limitations.

Parameters
[in]bugsArray of bugs/limitations.

Each entry in the input array identifies a separate issue. The array passed should remain valid for the lifetime of the writer object.

CommandLineHelpWriter & gmx::CommandLineHelpWriter::setKnownIssues ( ArrayRef< const std::string >  bug)

Sets text for known bugs.

Parameters
[in]bugText for bugs to show.
Exceptions
std::bad_allocif out of memory.

Formatting for the text is described on Help formatting.

void gmx::CommandLineHelpWriter::writeHelp ( const CommandLineHelpContext context)

Writes the help.

Parameters
[in]contextContext object for writing the help.
Exceptions
std::bad_allocif out of memory.
FileIOErroron any I/O error.

The documentation for this class was generated from the following files: