ROSE  0.9.10.54
Public Types | Static Public Member Functions | Protected Member Functions | List of all members
Sawyer::CommandLine::BooleanParser< T > Class Template Reference

Description

template<typename T>
class Sawyer::CommandLine::BooleanParser< T >

Parses a boolean value and converts it to numeric type T.

Matches any one of the strings "1", "t", "true", "y", "yes", "on" (as a true value), "0", "f", "false", "n", "no", and "off" (as a false value) followed by white space and attempts to convert it to the type T.

See also
booleanParser factory, and Command line parser factories.

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

#include <CommandLine.h>

Inheritance diagram for Sawyer::CommandLine::BooleanParser< T >:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::CommandLine::BooleanParser< T >:
Collaboration graph
[legend]

Public Types

typedef SharedPointer< BooleanParserPtr
 Reference counting pointer for this class. More...
 
- Public Types inherited from Sawyer::CommandLine::ValueParser
typedef SharedPointer< ValueParserPtr
 Reference counting pointer for this class. More...
 

Static Public Member Functions

static Ptr instance ()
 Allocating constructor. More...
 
static Ptr instance (const ValueSaver::Ptr &valueSaver)
 Allocating constructor. More...
 

Protected Member Functions

 BooleanParser ()
 Constructor for derived classes. More...
 
 BooleanParser (const ValueSaver::Ptr &valueSaver)
 Constructor for derived classes. More...
 
- Protected Member Functions inherited from Sawyer::CommandLine::ValueParser
 ValueParser ()
 Constructor for derived classes. More...
 
 ValueParser (const ValueSaver::Ptr &valueSaver)
 Constructor for derived classes. More...
 

Additional Inherited Members

- Public Member Functions inherited from Sawyer::CommandLine::ValueParser
ParsedValue matchString (const std::string &)
 Parse the entire string and return a value. More...
 
ParsedValue match (Cursor &)
 Parse a value from the beginning of the specified string. More...
 
Ptr valueSaver (const ValueSaver::Ptr &f)
 Property: functor responsible for saving a parsed value in user storage. More...
 
const ValueSaver::Ptr valueSaver () const
 Property: functor responsible for saving a parsed value in user storage. 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...
 
- Public Member Functions inherited from Sawyer::SharedFromThis< ValueParser >
SharedPointer< ValueParser > sharedFromThis ()
 Create a shared pointer from this. More...
 
SharedPointer< const ValueParser > sharedFromThis () const
 Create a shared pointer from this. More...
 

Member Typedef Documentation

template<typename T >
typedef SharedPointer<BooleanParser> Sawyer::CommandLine::BooleanParser< T >::Ptr

Reference counting pointer for this class.

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

Constructor & Destructor Documentation

template<typename T >
Sawyer::CommandLine::BooleanParser< T >::BooleanParser ( )
inlineprotected

Constructor for derived classes.

Non-subclass users should use instance instead.

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

Referenced by Sawyer::CommandLine::BooleanParser< T >::instance().

template<typename T >
Sawyer::CommandLine::BooleanParser< T >::BooleanParser ( const ValueSaver::Ptr valueSaver)
inlineprotected

Constructor for derived classes.

Non-subclass users should use instance instead.

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

Member Function Documentation

template<typename T >
static Ptr Sawyer::CommandLine::BooleanParser< T >::instance ( )
inlinestatic

Allocating constructor.

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

See also
Command line parser factories

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

Referenced by Sawyer::CommandLine::booleanParser().

template<typename T >
static Ptr Sawyer::CommandLine::BooleanParser< T >::instance ( const ValueSaver::Ptr valueSaver)
inlinestatic

Allocating constructor.

Returns a pointer to a new booleanParser object. Uses will most likely want to use the booleanParser factory instead, which takes the same arguments, but requires less typing.

See also
Command line parser factories

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

References Sawyer::CommandLine::BooleanParser< T >::BooleanParser().


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