ROSE  0.11.96.11
Public Types | Static Public Member Functions | Protected Member Functions | List of all members
Sawyer::CommandLine::ShowVersionAndExit Class Reference

Description

Functor to print a version string and exit.

This functor does the same thing as ShowVersion, but then it exits the program with the specified status.

Definition at line 1649 of file util/Sawyer/CommandLine.h.

#include <CommandLine.h>

Inheritance diagram for Sawyer::CommandLine::ShowVersionAndExit:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::CommandLine::ShowVersionAndExit:
Collaboration graph
[legend]

Public Types

typedef SharedPointer< ShowVersionAndExitPtr
 Reference counting pointer for this class.
 
- Public Types inherited from Sawyer::CommandLine::ShowVersion
typedef SharedPointer< ShowVersionPtr
 Reference counting pointer for this class.
 
- Public Types inherited from Sawyer::CommandLine::SwitchAction
typedef SharedPointer< SwitchActionPtr
 Reference counting pointer for this class.
 

Static Public Member Functions

static Ptr instance (const std::string &versionString, int exitStatus)
 Allocating constructor. More...
 
- Static Public Member Functions inherited from Sawyer::CommandLine::ShowVersion
static Ptr instance (const std::string &versionString)
 Allocating constructor. More...
 

Protected Member Functions

 ShowVersionAndExit (const std::string &versionString, int exitStatus)
 Constructor for derived classes. More...
 
virtual void operator() (const ParserResult &)
 
- Protected Member Functions inherited from Sawyer::CommandLine::ShowVersion
 ShowVersion (const std::string &versionString)
 Constructor for derived classes. More...
 

Additional Inherited Members

- Public Member Functions inherited from Sawyer::CommandLine::SwitchAction
void run (const ParserResult &parserResult)
 Runs the action. More...
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

Constructor & Destructor Documentation

◆ ShowVersionAndExit()

Sawyer::CommandLine::ShowVersionAndExit::ShowVersionAndExit ( const std::string &  versionString,
int  exitStatus 
)
inlineexplicitprotected

Constructor for derived classes.

Non-subclass users should use instance instead.

Definition at line 1653 of file util/Sawyer/CommandLine.h.

Member Function Documentation

◆ instance()

static Ptr Sawyer::CommandLine::ShowVersionAndExit::instance ( const std::string &  versionString,
int  exitStatus 
)
inlinestatic

Allocating constructor.

Returns a pointer to a new ShowVersionAndExit object. Uses will most likely want to use the showVersionAndExit factory instead, which requires less typing.

See also
Command line action factories, and the SwitchAction class.

Definition at line 1663 of file util/Sawyer/CommandLine.h.


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