Gromacs
2024.3
|
#include <gromacs/options/ioptionsbehavior.h>
Interface to provide extension points for options parsing.
Currently, this is only used in the context of ICommandLineOptionsModule and some other command-line handling, but it is declared in the options module for the lack of a better place: most implementations of the interface are in modules that do not otherwise depend on the commandline module.
Any code that wants to support these extension points needs to use OptionsBehaviorCollection and call the methods there at appropriate points. This is not (at least, not currently) integrated in any automatic way to the actual Options object.
Public Member Functions | |
virtual void | initBehavior (Options *options)=0 |
Called when the behavior is associated with an options object. More... | |
virtual void | optionsFinishing (Options *options)=0 |
Called when all option values have been assigned. More... | |
virtual void | optionsFinished ()=0 |
Called when all option values have been processed. More... | |
|
pure virtual |
Called when the behavior is associated with an options object.
This method can, e.g., use Options::addManager() to associate managers with the options object.
Implemented in gmx::SelectionOptionBehavior, and gmx::TimeUnitBehavior.
|
pure virtual |
Called when all option values have been processed.
This is called after Options::finish() (and typically after higher-level optionsFinished() methods, such as that in ICommandLineOptionsModule). This can add behavior that performs tasks based on the option values provided.
Implemented in gmx::SelectionOptionBehavior, and gmx::TimeUnitBehavior.
|
pure virtual |
Called when all option values have been assigned.
This is called just before Options::finish(), and can, e.g., do operations that still influence the option values.
Implemented in gmx::SelectionOptionBehavior, and gmx::TimeUnitBehavior.