ROSE 0.11.145.192
|
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
.
Definition at line 1164 of file Sawyer/CommandLine.h.
#include <Sawyer/CommandLine.h>
Public Types | |
typedef SharedPointer< BooleanParser > | Ptr |
Reference counting pointer for this class. | |
Public Types inherited from Sawyer::CommandLine::ValueParser | |
typedef SharedPointer< ValueParser > | Ptr |
Reference counting pointer for this class. | |
Static Public Member Functions | |
static Ptr | instance () |
Allocating constructor. | |
static Ptr | instance (const ValueSaver::Ptr &valueSaver) |
Allocating constructor. | |
Protected Member Functions | |
BooleanParser () | |
Constructor for derived classes. | |
BooleanParser (const ValueSaver::Ptr &valueSaver) | |
Constructor for derived classes. | |
Protected Member Functions inherited from Sawyer::CommandLine::ValueParser | |
ValueParser () | |
Constructor for derived classes. | |
ValueParser (const ValueSaver::Ptr &valueSaver) | |
Constructor for derived classes. | |
Additional Inherited Members | |
Public Member Functions inherited from Sawyer::CommandLine::ValueParser | |
ParsedValue | matchString (const std::string &) |
Parse the entire string and return a value. | |
ParsedValue | match (Cursor &) |
Parse a value from the beginning of the specified string. | |
Ptr | valueSaver (const ValueSaver::Ptr &f) |
Property: functor responsible for saving a parsed value in user storage. | |
const ValueSaver::Ptr | valueSaver () const |
Property: functor responsible for saving a parsed value in user storage. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Public Member Functions inherited from Sawyer::SharedFromThis< ValueParser > | |
SharedPointer< ValueParser > | sharedFromThis () |
Create a shared pointer from this . | |
SharedPointer< const ValueParser > | sharedFromThis () const |
Create a shared pointer from this . | |
typedef SharedPointer<BooleanParser> Sawyer::CommandLine::BooleanParser< T >::Ptr |
Reference counting pointer for this class.
Definition at line 1173 of file Sawyer/CommandLine.h.
|
inlineprotected |
Constructor for derived classes.
Non-subclass users should use instance instead.
Definition at line 1167 of file Sawyer/CommandLine.h.
Referenced by Sawyer::CommandLine::BooleanParser< T >::instance().
|
inlineprotected |
Constructor for derived classes.
Non-subclass users should use instance instead.
Definition at line 1170 of file Sawyer/CommandLine.h.
|
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.
Definition at line 1178 of file Sawyer/CommandLine.h.
Referenced by Sawyer::CommandLine::booleanParser(), and Sawyer::CommandLine::booleanParser().
|
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.
Definition at line 1183 of file Sawyer/CommandLine.h.
References Sawyer::CommandLine::BooleanParser< T >::BooleanParser(), and Sawyer::CommandLine::ValueParser::valueSaver().