ROSE  0.11.145.0
Command line action factories

Description

Factories for creating instances of Sawyer::CommandLine::SwitchAction subclasses.

A factory function is a more terse and convenient way of calling the instance allocating constructors for the various subclasses of SwitchAction, and they sometimes alleviate the user from having to supply template arguments. They take the same arguments as the instance method(s) and have the same name as the class they return, except their initial letter is lower-case. These two calls are equivalent:

SwitchAction::Ptr action1 = UserAction::instance<MyFunctor>(myFunctor);
SwitchAction::Ptr action2 = userAction(myFunctor);

Factories

Collaboration diagram for Command line action factories:
ShowVersion::Ptr Sawyer::CommandLine::showVersion (const std::string &versionString)
 Factory for switch action. More...
 
ShowVersionAndExit::Ptr Sawyer::CommandLine::showVersionAndExit (const std::string &versionString, int exitStatus)
 Factory for switch action. More...
 
ShowHelp::Ptr Sawyer::CommandLine::showHelp ()
 Factory for switch action. More...
 
ShowHelpAndExit::Ptr Sawyer::CommandLine::showHelpAndExit (int exitStatus)
 Factory for switch action. More...
 
ConfigureDiagnostics::Ptr Sawyer::CommandLine::configureDiagnostics (const std::string &, Message::Facilities &, bool exitOnHelp=true)
 Factory for switch action. More...
 
ConfigureDiagnosticsQuiet::Ptr Sawyer::CommandLine::configureDiagnosticsQuiet (Message::Facilities &)
 Factory for switch action. More...
 
template<class Functor >
UserAction< Functor >::Ptr Sawyer::CommandLine::userAction (const Functor &functor)
 Factory for switch action. More...
 

Function Documentation

ShowVersion::Ptr Sawyer::CommandLine::showVersion ( const std::string &  versionString)

Factory for switch action.

A factory function is a more terse and convenient way of calling the instance allocating constructors for SwitchAction subclasses and often alleviates the user from having to specify template arguments.

See also
ShowVersionAndExit::Ptr Sawyer::CommandLine::showVersionAndExit ( const std::string &  versionString,
int  exitStatus 
)

Factory for switch action.

A factory function is a more terse and convenient way of calling the instance allocating constructors for SwitchAction subclasses and often alleviates the user from having to specify template arguments.

See also
ShowHelp::Ptr Sawyer::CommandLine::showHelp ( )

Factory for switch action.

A factory function is a more terse and convenient way of calling the instance allocating constructors for SwitchAction subclasses and often alleviates the user from having to specify template arguments.

See also
ShowHelpAndExit::Ptr Sawyer::CommandLine::showHelpAndExit ( int  exitStatus)

Factory for switch action.

A factory function is a more terse and convenient way of calling the instance allocating constructors for SwitchAction subclasses and often alleviates the user from having to specify template arguments.

See also
ConfigureDiagnostics::Ptr Sawyer::CommandLine::configureDiagnostics ( const std::string &  ,
Message::Facilities ,
bool  exitOnHelp = true 
)

Factory for switch action.

A factory function is a more terse and convenient way of calling the instance allocating constructors for SwitchAction subclasses and often alleviates the user from having to specify template arguments.

See also
ConfigureDiagnosticsQuiet::Ptr Sawyer::CommandLine::configureDiagnosticsQuiet ( Message::Facilities )

Factory for switch action.

A factory function is a more terse and convenient way of calling the instance allocating constructors for SwitchAction subclasses and often alleviates the user from having to specify template arguments.

See also
template<class Functor >
UserAction<Functor>::Ptr Sawyer::CommandLine::userAction ( const Functor &  functor)

Factory for switch action.

A factory function is a more terse and convenient way of calling the instance allocating constructors for SwitchAction subclasses and often alleviates the user from having to specify template arguments.

See also

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

References Sawyer::CommandLine::UserAction< Functor >::instance().