Gromacs
2026.0-dev-20241204-d69d709
|
#include <gromacs/commandline/cmdlinehelpcontext.h>
Helper for passing CommandLineHelpContext into parse_common_args().
This class provides a mechanism to set and retrieve a global CommandLineHelpContext object. It is used to pass this object into parse_common_args() from CommandLineModuleManager::runAsMainCMain() through the main() function that is not aware of the wrapper binary mechanism. It is not thread-safe because in this limited use case, it is always called from a single-threaded context.
Public Member Functions | |
GlobalCommandLineHelpContext (const CommandLineHelpContext &context) | |
Sets the global context for the scope. More... | |
~GlobalCommandLineHelpContext () | |
Clears the global context. | |
Static Public Member Functions | |
static const CommandLineHelpContext * | get () |
Returns the global context, or NULL if not set. | |
|
explicit |
Sets the global context for the scope.
The global context is cleared when this object goes out of scope.
It is an error to have more than one GlobalCommandLineHelpContext object in existence at the same time.