Gromacs  2016.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 ConstArrayRef< const char * > &help)
 Sets the help text to print as description. More...
 
CommandLineHelpWritersetKnownIssues (const ConstArrayRef< const char * > &bugs)
 Sets the list of known bugs/limitations. 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 ConstArrayRef< const char * > &  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 ConstArrayRef< const char * > &  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.

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: