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

#include <gromacs/commandline/cmdlinehelpcontext.h>

Description

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.
 

Constructor & Destructor Documentation

gmx::GlobalCommandLineHelpContext::GlobalCommandLineHelpContext ( const CommandLineHelpContext context)
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.


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