ROSE 0.11.145.192
|
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 Sawyer/CommandLine.h.
#include <Sawyer/CommandLine.h>
Public Types | |
typedef SharedPointer< ShowVersion > | Ptr |
Reference counting pointer for this class. | |
Public Types inherited from Sawyer::CommandLine::SwitchAction | |
typedef SharedPointer< SwitchAction > | Ptr |
Reference counting pointer for this class. | |
Static Public Member Functions | |
static Ptr | instance (const std::string &versionString) |
Allocating constructor. | |
Protected Member Functions | |
ShowVersion (const std::string &versionString) | |
Constructor for derived classes. | |
virtual void | operator() (const ParserResult &) |
Additional Inherited Members | |
Public Member Functions inherited from Sawyer::CommandLine::SwitchAction | |
void | run (const ParserResult &parserResult) |
Runs the action. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Reference counting pointer for this class.
Definition at line 1636 of file Sawyer/CommandLine.h.
|
inlineexplicitprotected |
Constructor for derived classes.
Non-subclass users should use instance instead.
Definition at line 1633 of file Sawyer/CommandLine.h.
|
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.
Definition at line 1642 of file Sawyer/CommandLine.h.
|
protectedvirtual |
Implements Sawyer::CommandLine::SwitchAction.