Kept the changes to a minimum to avoid messing the git rename detect.
Will rename/reorganize the code a bit more in a separate commit.
Also install the files, since they are documented as being part of the
public API.
IssueID #666
Change-Id: I96cf743d9364f80624ae3424c99019ae824e1520
* is possible to add descriptions for individual options as well as for the
* whole set of options. These can then be used to write out a help using one
* of the provided help writers.
- * Currently, only one is defined: AsciiHelpWriter
+ * Currently, only one is defined: CommandLineHelpWriter
* (implementation is not yet complete).
*
* \if libapi
abstractoption.h
basicoptioninfo.h
basicoptions.h
+ cmdlinehelpwriter.h
+ cmdlineparser.h
optionfiletype.h
optionflags.h
optioninfo.h
*/
/*! \internal \file
* \brief
- * Declares private implementation class for gmx::AsciiHelpWriter.
+ * Declares private implementation class for gmx::CommandLineHelpWriter.
*
* \author Teemu Murtola <teemu.murtola@cbr.su.se>
* \ingroup module_options
*/
-#ifndef GMX_OPTIONS_ASCIIHELPWRITER_IMPL_HPP
-#define GMX_OPTIONS_ASCIIHELPWRITER_IMPL_HPP
+#ifndef GMX_OPTIONS_CMDLINEHELPWRITER_IMPL_H
+#define GMX_OPTIONS_CMDLINEHELPWRITER_IMPL_H
-#include "asciihelpwriter.h"
+#include "cmdlinehelpwriter.h"
#include "basicoptioninfo.h"
#include "optionsvisitor.h"
class Options;
/*! \internal \brief
- * Private implementation class for AsciiHelpWriter.
+ * Private implementation class for CommandLineHelpWriter.
*
* \ingroup module_options
*/
-class AsciiHelpWriter::Impl
+class CommandLineHelpWriter::Impl
{
public:
/*! \brief
*/
/*! \internal \file
* \brief
- * Implements gmx::AsciiHelpWriter.
+ * Implements gmx::CommandLineHelpWriter.
*
* \author Teemu Murtola <teemu.murtola@cbr.su.se>
* \ingroup module_options
*/
-#include "gromacs/options/asciihelpwriter.h"
+#include "gromacs/options/cmdlinehelpwriter.h"
#include <cstdio>
#include <cstdlib>
#include "gromacs/options/options.h"
#include "gromacs/options/optionsvisitor.h"
-#include "asciihelpwriter-impl.h"
+#include "cmdlinehelpwriter-impl.h"
namespace gmx
{
/********************************************************************
- * AsciiHelpWriter::Impl
+ * CommandLineHelpWriter::Impl
*/
-AsciiHelpWriter::Impl::Impl(const Options &options)
+CommandLineHelpWriter::Impl::Impl(const Options &options)
: _options(options)
{
}
}
/********************************************************************
- * AsciiHelpWriter
+ * CommandLineHelpWriter
*/
-AsciiHelpWriter::AsciiHelpWriter(const Options &options)
+CommandLineHelpWriter::CommandLineHelpWriter(const Options &options)
: _impl(new Impl(options))
{
}
-AsciiHelpWriter::~AsciiHelpWriter()
+CommandLineHelpWriter::~CommandLineHelpWriter()
{
}
-AsciiHelpWriter &AsciiHelpWriter::setShowHidden(bool bSet)
+CommandLineHelpWriter &CommandLineHelpWriter::setShowHidden(bool bSet)
{
_impl->_flags.set(Impl::efShowHidden, bSet);
return *this;
}
-AsciiHelpWriter &AsciiHelpWriter::setShowDescriptions(bool bSet)
+CommandLineHelpWriter &CommandLineHelpWriter::setShowDescriptions(bool bSet)
{
_impl->_flags.set(Impl::efShowDescriptions, bSet);
return *this;
}
-void AsciiHelpWriter::writeHelp(FILE *fp)
+void CommandLineHelpWriter::writeHelp(FILE *fp)
{
if (_impl->_flags.test(Impl::efShowDescriptions))
{
*/
/*! \file
* \brief
- * Declares gmx::AsciiHelpWriter.
+ * Declares gmx::CommandLineHelpWriter.
*
* \author Teemu Murtola <teemu.murtola@cbr.su.se>
* \inpublicapi
* \ingroup module_options
*/
-#ifndef GMX_OPTIONS_ASCIIHELPWRITER_H
-#define GMX_OPTIONS_ASCIIHELPWRITER_H
+#ifndef GMX_OPTIONS_CMDLINEHELPWRITER_H
+#define GMX_OPTIONS_CMDLINEHELPWRITER_H
#include <cstdio>
* \inpublicapi
* \ingroup module_options
*/
-class AsciiHelpWriter
+class CommandLineHelpWriter
{
public:
/*! \brief
*
* \param[in] options Options for which help should be printed.
*/
- explicit AsciiHelpWriter(const Options &options);
- ~AsciiHelpWriter();
+ explicit CommandLineHelpWriter(const Options &options);
+ ~CommandLineHelpWriter();
/*! \brief
* Sets whether hidden options are shown in the help.
*/
- AsciiHelpWriter &setShowHidden(bool bShow);
+ CommandLineHelpWriter &setShowHidden(bool bShow);
/*! \brief
* Sets whether long descriptions for sections are shown in the help.
*/
- AsciiHelpWriter &setShowDescriptions(bool bShow);
+ CommandLineHelpWriter &setShowDescriptions(bool bShow);
/*! \brief
* Writes the help.
#include "statutil.h"
#include "gromacs/analysisdata/paralleloptions.h"
-#include "gromacs/options/asciihelpwriter.h"
+#include "gromacs/options/cmdlinehelpwriter.h"
#include "gromacs/options/cmdlineparser.h"
#include "gromacs/options/options.h"
#include "gromacs/selection/selectioncollection.h"
TrajectoryAnalysisRunnerCommon::HelpFlags flags = common.helpFlags();
if (flags != 0)
{
- AsciiHelpWriter(options)
+ CommandLineHelpWriter(options)
.setShowDescriptions(flags & TrajectoryAnalysisRunnerCommon::efHelpShowDescriptions)
.setShowHidden(flags & TrajectoryAnalysisRunnerCommon::efHelpShowHidden)
.writeHelp(stderr);