"analysis groups."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(FileNameOption("o")
.filetype(eftPlot).outputFile()
}
cmdlineContext->setModuleDisplayName(helpModule_.binaryName_);
optionsHolder.initOptions();
- Options &options = *optionsHolder.options();
- options.setDescription(RootHelpText::text);
+ Options &options = *optionsHolder.options();
+ ConstArrayRef<const char *> helpText;
+ if (context.outputFormat() != eHelpOutputFormat_Console)
+ {
+ helpText = RootHelpText::text;
+ }
// TODO: Add <command> [<args>] into the synopsis.
CommandLineHelpWriter(options)
- .setShowDescriptions(context.outputFormat() != eHelpOutputFormat_Console)
+ .setHelpText(helpText)
.writeHelp(*cmdlineContext);
}
if (context.outputFormat() == eHelpOutputFormat_Console)
//! \addtogroup module_commandline
//! \{
-/********************************************************************
- * DescriptionsFormatter
- */
-
-class DescriptionsFormatter : public OptionsVisitor
-{
- public:
- /*! \brief
- * Creates a new description formatter.
- *
- * \param[in] context Help context to use to write the help.
- */
- explicit DescriptionsFormatter(const HelpWriterContext &context)
- : context_(context), title_(NULL), bDidOutput_(false)
- {
- }
-
- //! Formats all section descriptions from a given options.
- void format(const Options &options, const char *title)
- {
- title_ = title;
- bDidOutput_ = false;
- visitSubSection(options);
- if (bDidOutput_)
- {
- context_.outputFile().writeLine();
- }
- }
-
- //! Formats the description for a single subsection and handles recursion.
- virtual void visitSubSection(const Options §ion);
- // This method is not used and never called.
- virtual void visitOption(const OptionInfo & /*option*/) {}
-
- private:
- const HelpWriterContext &context_;
- const char *title_;
- bool bDidOutput_;
-
- GMX_DISALLOW_COPY_AND_ASSIGN(DescriptionsFormatter);
-};
-
-void DescriptionsFormatter::visitSubSection(const Options §ion)
-{
- if (!section.description().empty())
- {
- if (bDidOutput_)
- {
- context_.outputFile().writeLine();
- }
- else if (title_ != NULL)
- {
- context_.writeTitle(title_);
- }
- // TODO: Print title for the section?
- context_.writeTextBlock(section.description());
- bDidOutput_ = true;
- }
-
- OptionsIterator iterator(section);
- iterator.acceptSubSections(this);
-}
-
/********************************************************************
* IOptionsFormatter
*/
//! Options object to use for generating help.
const Options &options_;
+ //! Help text.
+ std::string helpText_;
//! List of bugs/knows issues.
ConstArrayRef<const char *> bugs_;
//! Time unit to show in descriptions.
std::string timeUnit_;
- //! Whether to write descriptions to output.
- bool bShowDescriptions_;
};
CommandLineHelpWriter::Impl::Impl(const Options &options)
- : options_(options), timeUnit_(TimeUnitManager().timeUnitAsString()),
- bShowDescriptions_(false)
+ : options_(options), timeUnit_(TimeUnitManager().timeUnitAsString())
{
}
}
CommandLineHelpWriter &
-CommandLineHelpWriter::setShowDescriptions(bool bSet)
+CommandLineHelpWriter::setTimeUnitString(const char *timeUnit)
{
- impl_->bShowDescriptions_ = bSet;
+ impl_->timeUnit_ = timeUnit;
return *this;
}
CommandLineHelpWriter &
-CommandLineHelpWriter::setTimeUnitString(const char *timeUnit)
+CommandLineHelpWriter::setHelpText(const std::string &help)
{
- impl_->timeUnit_ = timeUnit;
+ impl_->helpText_ = help;
+ return *this;
+}
+
+CommandLineHelpWriter &
+CommandLineHelpWriter::setHelpText(const ConstArrayRef<const char *> &help)
+{
+ impl_->helpText_ = joinStrings(help, "\n");
return *this;
}
synopsisFormatter.finish();
}
- if (impl_->bShowDescriptions_)
+ if (!impl_->helpText_.empty())
{
- DescriptionsFormatter descriptionFormatter(writerContext);
- descriptionFormatter.format(impl_->options_, "Description");
+ writerContext.writeTitle("Description");
+ writerContext.writeTextBlock(impl_->helpText_);
+ writerContext.outputFile().writeLine();
}
CommonFormatterData common(impl_->timeUnit_.c_str());
OptionsListFormatter formatter(writerContext, common, "Options");
/*
* 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.
*
#include "gromacs/commandline/cmdlineparser.h"
#include "gromacs/options/filenameoptionmanager.h"
#include "gromacs/options/options.h"
+#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/stringutil.h"
namespace gmx
{
namespace
{
+/********************************************************************
+ * CommandLineOptionsModuleSettings
+ */
+
+class CommandLineOptionsModuleSettings : public ICommandLineOptionsModuleSettings
+{
+ public:
+ const std::string &helpText() const { return helpText_; }
+
+ virtual void setHelpText(const ConstArrayRef<const char *> &help)
+ {
+ helpText_ = joinStrings(help, "\n");
+ }
+
+ private:
+ std::string helpText_;
+};
+
/********************************************************************
* CommandLineOptionsModule
*/
moduleGuard.reset(factory_());
module = moduleGuard.get();
}
- Options options(name(), shortDescription());
- module->initOptions(&options);
+ Options options(name(), shortDescription());
+ CommandLineOptionsModuleSettings settings;
+ module->initOptions(&options, &settings);
CommandLineHelpWriter(options)
- .setShowDescriptions(true)
+ .setHelpText(settings.helpText())
.writeHelp(context);
}
options.addManager(&fileoptManager);
- module_->initOptions(&options);
+ CommandLineOptionsModuleSettings settings;
+ module_->initOptions(&options, &settings);
{
CommandLineParser parser(&options);
parser.parse(&argc, argv);
} // namespace
+/********************************************************************
+ * ICommandLineOptionsModuleSettings
+ */
+
+ICommandLineOptionsModuleSettings::~ICommandLineOptionsModuleSettings()
+{
+}
+
/********************************************************************
* ICommandLineOptionsModule
*/
namespace gmx
{
+template <typename T> class ConstArrayRef;
+
class CommandLineModuleManager;
class ICommandLineModule;
class Options;
+/*! \brief
+ * Settings to pass information between a CommandLineOptionsModule and generic
+ * code that runs it.
+ *
+ * \inpublicapi
+ * \ingroup module_commandline
+ */
+class ICommandLineOptionsModuleSettings
+{
+ public:
+ /*! \brief
+ * Sets the help text for the module from string array.
+ *
+ * \param[in] help String array to set as the description.
+ * \throws std::bad_alloc if out of memory.
+ *
+ * Formatting for the help text is described on \ref page_onlinehelp.
+ *
+ * Example usage:
+ * \code
+ const char *const desc[] = {
+ "This is the description",
+ "for the options"
+ };
+
+ settings->setHelpText(desc);
+ \endcode
+ */
+ virtual void setHelpText(const ConstArrayRef<const char *> &help) = 0;
+
+ protected:
+ // Disallow deletion through the interface.
+ // (no need for the virtual, but some compilers warn otherwise)
+ virtual ~ICommandLineOptionsModuleSettings();
+};
+
/*! \brief
* Module that can be run from a command line and uses gmx::Options for
* argument processing.
* Initializes command-line arguments understood by the module.
*
* \param[in,out] options Options object to add the options to.
+ * \param[in,out] settings Settings to communicate information
+ * to/from generic code running the module.
*
* When running the module, this method is called after init().
* When printing help, there is no call to init(), and this is the only
* the module to \p options. Output values from options should be
* stored in member variables.
*/
- virtual void initOptions(Options *options) = 0;
+ virtual void initOptions(Options *options,
+ ICommandLineOptionsModuleSettings *settings) = 0;
/*! \brief
* Called after all option values have been set.
*
* If the module needs to call, e.g., Options::isSet(), this is the
* place to do that.
*/
- virtual void optionsFinished(Options *options) = 0;
+ virtual void optionsFinished(Options *options) = 0;
/*! \brief
* Runs the module.
fileOptManager.disableInputOptionChecking(
FF(PCA_NOT_READ_NODE) || FF(PCA_DISABLE_INPUT_FILE_CHECKING));
options.addManager(&fileOptManager);
- options.setDescription(gmx::constArrayRefFromArray<const char *>(desc, ndesc));
if (FF(PCA_CAN_SET_DEFFNM))
{
"Help output should be handled higher up and "
"only get called only on the master rank");
gmx::CommandLineHelpWriter(options)
- .setShowDescriptions(true)
+ .setHelpText(gmx::constArrayRefFromArray<const char *>(desc, ndesc))
.setTimeUnitString(timeUnitManager.timeUnitAsString())
.setKnownIssues(gmx::constArrayRefFromArray(bugs, nbugs))
.writeHelp(*context);
*
* \ingroup module_commandline
*/
-void initOptionsBasic(gmx::Options *options)
+void initOptionsBasic(gmx::Options *options,
+ gmx::ICommandLineOptionsModuleSettings *settings)
{
const char *const desc[] = {
"Sample description",
"for testing [THISMODULE]."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(gmx::IntegerOption("int"));
}
MockHelpTopic &topic2 = addHelpTopic("topic2", "Another topic");
using ::testing::_;
using ::testing::Invoke;
- EXPECT_CALL(mod1, initOptions(_)).WillOnce(Invoke(&initOptionsBasic));
- EXPECT_CALL(mod2, initOptions(_));
+ EXPECT_CALL(mod1, initOptions(_, _)).WillOnce(Invoke(&initOptionsBasic));
+ EXPECT_CALL(mod2, initOptions(_, _));
EXPECT_CALL(topic1, writeHelp(_));
EXPECT_CALL(sub1, writeHelp(_));
EXPECT_CALL(sub2, writeHelp(_));
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/filenameoption.h"
#include "gromacs/options/options.h"
+#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/stringstream.h"
#include "testutils/stringtest.h"
#endif
/*
- * Tests help printing for multiple sections.
+ * Tests help output using a help text.
*/
-TEST_F(CommandLineHelpWriterTest, HandlesMultipleSections)
+TEST_F(CommandLineHelpWriterTest, HandlesHelpText)
{
- using namespace gmx;
+ const char *const help[] = {
+ "Help text",
+ "for testing."
+ };
+ using gmx::IntegerOption;
- Options options("test", "Main Title");
- Options subSect1("subsect1", "Subsection 1 Title");
- Options subSect2("subsect2", "Subsection 2 Title");
- Options subSect3("subsect3", NULL);
- options.addSubSection(&subSect1);
- options.addSubSection(&subSect2);
- options.addSubSection(&subSect3);
- options.setDescription("Description for main section.");
- subSect1.setDescription("Description for subsection 1.");
- subSect2.setDescription("Description for subsection 2.");
- subSect3.setDescription("Description for subsection 3.");
- options.addOption(IntegerOption("main")
- .description("Option in main section"));
- subSect1.addOption(IntegerOption("sub1")
- .description("Option in subsection 1"));
- subSect2.addOption(IntegerOption("sub2")
- .description("Option in subsection 2"));
+ gmx::Options options(NULL, NULL);
+ options.addOption(IntegerOption("int").description("Integer option")
+ .defaultValue(2));
- CommandLineHelpWriter writer(options);
- writer.setShowDescriptions(true);
+ gmx::CommandLineHelpWriter writer(options);
+ writer.setHelpText(help);
checkHelp(&writer);
}
~MockOptionsModule();
MOCK_METHOD1(init, void(gmx::CommandLineModuleSettings *settings));
- MOCK_METHOD1(initOptions, void(gmx::Options *options));
+ MOCK_METHOD2(initOptions, void(gmx::Options *options, gmx::ICommandLineOptionsModuleSettings *settings));
MOCK_METHOD1(optionsFinished, void(gmx::Options *options));
MOCK_METHOD0(run, int());
};
--- /dev/null
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="referencedata.xsl"?>
+<ReferenceData>
+ <String Name="HelpText"><![CDATA[
+SYNOPSIS
+
+gmx [-int <int>]
+
+DESCRIPTION
+
+Help text for testing.
+
+OPTIONS
+
+Other options:
+
+ -int <int> (2)
+ Integer option
+
+]]></String>
+</ReferenceData>
+++ /dev/null
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="referencedata.xsl"?>
-<ReferenceData>
- <String Name="HelpText"><![CDATA[
-SYNOPSIS
-
-gmx [-sub1 <int>] [-sub2 <int>] [-main <int>]
-
-DESCRIPTION
-
-Description for main section.
-
-Description for subsection 1.
-
-Description for subsection 2.
-
-Description for subsection 3.
-
-OPTIONS
-
-Other options:
-
- -sub1 <int>
- Option in subsection 1
- -sub2 <int>
- Option in subsection 2
- -main <int>
- Option in main section
-
-]]></String>
-</ReferenceData>
{
}
- virtual void initOptions(Options *options);
+ virtual void initOptions(Options *options,
+ ICommandLineOptionsModuleSettings *settings);
virtual void optionsFinished(Options *options);
virtual int run();
int enumRot_;
};
-void InsertMolecules::initOptions(Options *options)
+void InsertMolecules::initOptions(Options *options,
+ ICommandLineOptionsModuleSettings *settings)
{
const char *const desc[] = {
"[THISMODULE] inserts [TT]-nmol[tt] copies of the system specified in",
"[TT]-try[tt] and [TT]-rot[tt] work as in the default mode (see above)."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
// TODO: Replace use of legacyType.
options->addOption(FileNameOption("f")
/*
* 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.
//! Name for the Options object.
std::string name_;
- //! Description title for the Options object.
- std::string title_;
- //! Full description for the Options object.
- std::string description_;
/*! \brief
* Option managers set for this collection.
*
* Options::Impl
*/
-Options::Impl::Impl(const char *name, const char *title)
- : name_(name != NULL ? name : ""), title_(title != NULL ? title : ""),
+Options::Impl::Impl(const char *name, const char * /*title*/)
+ : name_(name != NULL ? name : ""),
parent_(NULL)
{
}
return impl_->name_;
}
-const std::string &Options::title() const
-{
- return impl_->title_;
-}
-
-const std::string &Options::description() const
-{
- return impl_->description_;
-}
-
-void Options::setDescription(const std::string &desc)
-{
- impl_->description_ = desc;
-}
-
-void Options::setDescription(const ConstArrayRef<const char *> &descArray)
-{
- impl_->description_ = joinStrings(descArray, "\n");
-}
void Options::addManager(IOptionManager *manager)
{
namespace gmx
{
-template <typename T> class ConstArrayRef;
-
class AbstractOption;
class OptionsAssigner;
class OptionsIterator;
//! Returns the short name of the option collection.
const std::string &name() const;
- //! Returns the title of the option collection.
- const std::string &title() const;
- //! Returns the full description of the option collection.
- const std::string &description() const;
-
- /*! \brief
- * Sets the full description of the option collection.
- *
- * \param[in] desc String to set as the description.
- *
- * This overload is mainly useful if the description is very short.
- * Currently this is mostly the case in unit testing.
- */
- void setDescription(const std::string &desc);
- /*! \brief
- * Sets the full description of the option collection from string array.
- *
- * \param[in] descArray String array to set as the description.
- *
- * All strings in `descArray` are concatenated to form the description.
- * Spaces are inserted between strings if they are missing.
- *
- * Example usage:
- * \code
- const char *const desc[] = {
- "This is the description",
- "for the options"
- };
-
- gmx::Options options(NULL, NULL);
- options.setDescription(desc);
- \endcode
- *
- * To use this overload, you must also include
- * `gromacs/utility/arrayref.h`.
- */
- void setDescription(const ConstArrayRef<const char *> &descArray);
/*! \brief
* Adds an option manager.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,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_TRAJECTORYANALYSIS_ANALYSISSETTINGS_IMPL_H
#define GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_IMPL_H
+#include <string>
+
#include "gromacs/analysisdata/modules/plot.h"
#include "gromacs/options/timeunitmanager.h"
#include "gromacs/trajectoryanalysis/analysissettings.h"
bool bRmPBC;
//! Whether to pass PBC information to the analysis module.
bool bPBC;
+
+ //! Help text for the module.
+ std::string helpText_;
};
} // namespace gmx
/*
* 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.
#include "gromacs/fileio/trxio.h"
#include "gromacs/math/vec.h"
#include "gromacs/topology/topology.h"
+#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/stringutil.h"
#include "analysissettings-impl.h"
impl_->frflags = frflags;
}
+const std::string &
+TrajectoryAnalysisSettings::helpText() const
+{
+ return impl_->helpText_;
+}
+
+void
+TrajectoryAnalysisSettings::setHelpText(const ConstArrayRef<const char *> &help)
+{
+ impl_->helpText_ = joinStrings(help, "\n");
+}
+
/********************************************************************
* TopologyInformation
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,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_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H
#define GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H
+#include <string>
+
#include "gromacs/math/vectypes.h"
#include "gromacs/options/timeunitmanager.h"
#include "gromacs/utility/classhelpers.h"
namespace gmx
{
+template <typename T> class ConstArrayRef;
+
class AnalysisDataPlotSettings;
class Options;
class TrajectoryAnalysisRunnerCommon;
*/
void setFrameFlags(int frflags);
+ //! Returns the help text.
+ const std::string &helpText() const;
+ //! \copydoc ICommandLineOptionsModuleSettings::setHelpText(const std::string &)
+ void setHelpText(const ConstArrayRef<const char *> &help);
+
private:
class Impl;
selections.initOptions(&selectionOptions);
CommandLineHelpWriter(options)
- .setShowDescriptions(true)
+ .setHelpText(settings.helpText())
.setTimeUnitString(settings.timeUnitManager().timeUnitAsString())
.writeHelp(context);
}
void
-Angle::initOptions(Options *options, TrajectoryAnalysisSettings * /*settings*/)
+Angle::initOptions(Options *options, TrajectoryAnalysisSettings *settings)
{
static const char *const desc[] = {
"[THISMODULE] computes different types of angles between vectors.",
static const char *const cGroup2TypeEnum[] =
{ "none", "vector", "plane", "t0", "z", "sphnorm" };
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(FileNameOption("oav").filetype(eftPlot).outputFile()
.store(&fnAverage_).defaultBasename("angaver")
void
-Distance::initOptions(Options *options, TrajectoryAnalysisSettings * /*settings*/)
+Distance::initOptions(Options *options, TrajectoryAnalysisSettings *settings)
{
static const char *const desc[] = {
"[THISMODULE] calculates distances between pairs of positions",
"distances, use [gmx-pairdist]."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(FileNameOption("oav").filetype(eftPlot).outputFile()
.store(&fnAverage_).defaultBasename("distave")
"the terminal."
};
- // Add the descriptive text (program help text) to the options
- options->setDescription(desc);
+ settings->setHelpText(desc);
// Add option for optional output file
options->addOption(FileNameOption("o").filetype(eftPlot).outputFile()
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 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.
void
-PairDistance::initOptions(Options *options, TrajectoryAnalysisSettings * /*settings*/)
+PairDistance::initOptions(Options *options, TrajectoryAnalysisSettings *settings)
{
static const char *const desc[] = {
"[THISMODULE] calculates pairwise distances between one reference",
"[gmx-distance] may be a more suitable tool."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(FileNameOption("o").filetype(eftPlot).outputFile().required()
.store(&fnDist_).defaultBasename("dist")
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 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.
}
void
-Rdf::initOptions(Options *options, TrajectoryAnalysisSettings * /*settings*/)
+Rdf::initOptions(Options *options, TrajectoryAnalysisSettings *settings)
{
static const char *const desc[] = {
"[THISMODULE] calculates radial distribution functions from one",
"i.e. the average number of particles within a distance r.[PAR]"
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(FileNameOption("o").filetype(eftPlot).outputFile().required()
.store(&fnRdf_).defaultBasename("rdf")
"that are both too high."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(FileNameOption("o").filetype(eftPlot).outputFile().required()
.store(&fnArea_).defaultBasename("area")
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,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.
void
-Select::initOptions(Options *options, TrajectoryAnalysisSettings * /*settings*/)
+Select::initOptions(Options *options, TrajectoryAnalysisSettings *settings)
{
static const char *const desc[] = {
"[THISMODULE] writes out basic data about dynamic selections.",
"dynamic selections."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(FileNameOption("os").filetype(eftPlot).outputFile()
.store(&fnSize_).defaultBasename("size")
/*
* 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.
}
void
-SelectionTester::initOptions(Options *options,
- TrajectoryAnalysisSettings * /*settings*/)
+SelectionTester::initOptions(Options *options,
+ TrajectoryAnalysisSettings *settings)
{
static const char *const desc[] = {
"This is a test program for selections."
};
- options->setDescription(desc);
+ settings->setHelpText(desc);
options->addOption(SelectionOption("select").storeVector(&selections_)
.required().multiValue()