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

Description

Functor to print a version string.

The string supplied to the constructor is printed to standard error followed by a line feed. Although the string is intended to be a version number, it can be anything you like. Sometimes people use this action to aid debugging of the parsing.

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

#include <CommandLine.h>

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

Public Types

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)
 Allocating constructor. More...
 

Protected Member Functions

 ShowVersion (const std::string &versionString)
 Constructor for derived classes. More...
 
virtual void operator() (const ParserResult &)
 

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

◆ ShowVersion()

Sawyer::CommandLine::ShowVersion::ShowVersion ( const std::string &  versionString)
inlineexplicitprotected

Constructor for derived classes.

Non-subclass users should use instance instead.

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

Member Function Documentation

◆ instance()

static Ptr Sawyer::CommandLine::ShowVersion::instance ( const std::string &  versionString)
inlinestatic

Allocating constructor.

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

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

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


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