/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#ifndef GMX_COMMANDLINE_CMDLINEHELPWRITER_H
#define GMX_COMMANDLINE_CMDLINEHELPWRITER_H
+#include <string>
+
#include "gromacs/utility/classhelpers.h"
namespace gmx
template <typename T> class ConstArrayRef;
/*! \brief
- * Writes help information for Options in ascii format.
+ * Writes help information for Options.
*
* \inpublicapi
* \ingroup module_commandline
explicit CommandLineHelpWriter(const Options &options);
~CommandLineHelpWriter();
- /*! \brief
- * Sets whether long descriptions for sections are shown in the help.
- */
- CommandLineHelpWriter &setShowDescriptions(bool bShow);
/*! \brief
* Sets time unit to show in descriptions.
*
* If not called, uses a default "ps".
*/
CommandLineHelpWriter &setTimeUnitString(const char *timeUnit);
-
+ /*! \brief
+ * Sets the help text to print as description.
+ *
+ * \param[in] help Help text to show.
+ * \throws std::bad_alloc if 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 \ref page_onlinehelp.
+ */
+ CommandLineHelpWriter &setHelpText(const std::string &help);
+ //! \copydoc setHelpText(const std::string &)
+ CommandLineHelpWriter &
+ setHelpText(const ConstArrayRef<const char *> &help);
/*! \brief
* Sets the list of known bugs/limitations.
*