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

#include <gromacs/commandline/cmdlineoptionsmodule.h>

Description

Settings to pass information between a CommandLineOptionsModule and generic code that runs it.

Public Member Functions

virtual void setHelpText (const ConstArrayRef< const char * > &help)=0
 Sets the help text for the module from string array. More...
 
virtual void addOptionsBehavior (const std::shared_ptr< IOptionsBehavior > &behavior)=0
 Adds an option behavior that performs actions before ICommandLineOptionsModule::run() is called. More...
 

Member Function Documentation

virtual void gmx::ICommandLineOptionsModuleSettings::addOptionsBehavior ( const std::shared_ptr< IOptionsBehavior > &  behavior)
pure virtual

Adds an option behavior that performs actions before ICommandLineOptionsModule::run() is called.

For now, this takes a shared_ptr to make it easier for the caller to keep a reference to the behavior, but the behavior should be treated as owned by the options module after this call.

virtual void gmx::ICommandLineOptionsModuleSettings::setHelpText ( const ConstArrayRef< const char * > &  help)
pure virtual

Sets the help text for the module from string array.

Parameters
[in]helpString array to set as the description.
Exceptions
std::bad_allocif out of memory.

Formatting for the help text is described on Help formatting.

Example usage:

const char *const desc[] = {
"This is the description",
"for the options"
};
settings->setHelpText(desc);

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