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

#include <gromacs/commandline/cmdlineprogramcontext.h>

+ Inheritance diagram for gmx::CommandLineProgramContext:
+ Collaboration diagram for gmx::CommandLineProgramContext:

Description

Program context implementation for command line programs.

Constructors are provided mostly for unit testing purposes; in normal usage, a single CommandLineProgramContext object is constructed with initForCommandLine() in the beginning of the program. The returned object can be explicitly passed to other methods, or accessed through getProgramContext().

Unless explicitly noted otherwise, methods in this class may throw std::bad_alloc on out-of-memory conditions, but do not throw other exceptions.

Public Member Functions

 CommandLineProgramContext ()
 Constructs an empty context object. More...
 
 CommandLineProgramContext (const char *binaryName)
 Initializes a program context object with binary name only. More...
 
 CommandLineProgramContext (int argc, const char *const argv[])
 Initializes a program context object based on command line. More...
 
 CommandLineProgramContext (int argc, const char *const argv[], ExecutableEnvironmentPointer env)
 Initializes a program context object based on command line. More...
 
void setDisplayName (const std::string &name)
 Sets a display name for the binary. More...
 
virtual const char * programName () const
 Returns the name of the binary as it was invoked without any path. More...
 
virtual const char * displayName () const
 Returns a display name of the current module. More...
 
virtual const char * fullBinaryPath () const
 Returns the full path of the running binary. More...
 
virtual InstallationPrefixInfo installationPrefix () const
 Returns the installation prefix (for finding GROMACS data files). More...
 
virtual const char * commandLine () const
 Returns the full command line used to invoke the binary. More...
 

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