ROSE 0.11.145.147
Command line value augmenter factories

Description

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

A factory function is a more terse and convenient way of calling the instance allocating constructors for the various subclasses of ValueAugmenter, 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:

ValueAugmenter::Ptr a1 = Sum::instance<int>();
ValueAugmenter::Ptr a2 = sum<int>();
SharedPointer< ValueAugmenter > Ptr
Reference counting pointer for this class.

Factories

Collaboration diagram for Command line value augmenter factories:
template<typename T >
Sum< T >::Ptr Sawyer::CommandLine::sum ()
 Factory for value agumenter.
 

Function Documentation

◆ sum()

template<typename T >
Sum< T >::Ptr Sawyer::CommandLine::sum ( )

Factory for value agumenter.

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

See also

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

References Sawyer::CommandLine::Sum< T >::instance().

Referenced by Sawyer::CommandLine::Sum< T >::operator()().