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

Description

Functor to print the Unix man page.

This functor, when applied, creates a Unix manual page from available documentation in the parser, and then invokes standard Unix commands to format the text and page it to standard output. Strange things might happen if standard input is not the terminal, since the pager will probably be expecting to read commands from standard input.

Definition at line 1674 of file Sawyer/CommandLine.h.

#include <Sawyer/CommandLine.h>

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

Public Types

typedef SharedPointer< ShowHelpPtr
 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 ()
 Allocating constructor.
 

Protected Member Functions

 ShowHelp ()
 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.
 
SharedObjectoperator= (const SharedObject &)
 Assignment.
 

Member Typedef Documentation

◆ Ptr

Reference counting pointer for this class.

Definition at line 1680 of file Sawyer/CommandLine.h.

Constructor & Destructor Documentation

◆ ShowHelp()

Sawyer::CommandLine::ShowHelp::ShowHelp ( )
inlineprotected

Constructor for derived classes.

Non-subclass users should use instance instead.

Definition at line 1677 of file Sawyer/CommandLine.h.

Member Function Documentation

◆ instance()

static Ptr Sawyer::CommandLine::ShowHelp::instance ( )
inlinestatic

Allocating constructor.

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

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

Definition at line 1686 of file Sawyer/CommandLine.h.

◆ operator()()

virtual void Sawyer::CommandLine::ShowHelp::operator() ( const ParserResult )
protectedvirtual

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