Gromacs  2024.3
 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>

Inherited by gmx::anonymous_namespace{cmdlineoptionsmodule.cpp}::CommandLineOptionsModuleSettings.

Description

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

Public Member Functions

virtual void setHelpText (const ArrayRef< const char *const > &help)=0
 Sets the help text for the module from string array. More...
 
virtual void setBugText (const ArrayRef< const char *const > &bug)=0
 Set text indicating buggy behaviour of a 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::setBugText ( const ArrayRef< const char *const > &  bug)
pure virtual

Set text indicating buggy behaviour of a module from string array.

Parameters
[in]bugString array to set as the bug text.
Exceptions
std::bad_allocif out of memory.

Formatting for the text is described on Help formatting.

virtual void gmx::ICommandLineOptionsModuleSettings::setHelpText ( const ArrayRef< const char *const > &  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: