ROSE  0.11.52.0
Public Types | Static Public Member Functions | Protected Member Functions | List of all members
Rose::Color::ColorizationParser Class Reference

Description

Parses an output color specification.

Definition at line 61 of file Rose/Color.h.

#include <Color.h>

Inheritance diagram for Rose::Color::ColorizationParser:
Inheritance graph
[legend]
Collaboration diagram for Rose::Color::ColorizationParser:
Collaboration graph
[legend]

Public Types

typedef Sawyer::SharedPointer< ColorizationParserPtr
 Shared ownership pointer to a ColorizationParser. 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 Sawyer::CommandLine::ValueSaver::Ptr &valueSaver)
 Allocating constructor. More...
 
static std::string docString ()
 Documentation for parser. More...
 
static Colorization parse (const char *input, const char **rest)
 Parse a colorized output specification from a C string. More...
 
static Colorization parse (const std::string &input)
 Parse a colorized output specification from a C++ string. More...
 

Protected Member Functions

 ColorizationParser (const Sawyer::CommandLine::ValueSaver::Ptr &valueSaver)
 
- 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

Shared ownership pointer to a ColorizationParser.

See Shared ownership.

Definition at line 69 of file Rose/Color.h.

Member Function Documentation

static Ptr Rose::Color::ColorizationParser::instance ( )
inlinestatic

Allocating constructor.

Definition at line 72 of file Rose/Color.h.

static Ptr Rose::Color::ColorizationParser::instance ( const Sawyer::CommandLine::ValueSaver::Ptr valueSaver)
inlinestatic

Allocating constructor.

Definition at line 77 of file Rose/Color.h.

static std::string Rose::Color::ColorizationParser::docString ( )
static

Documentation for parser.

static Colorization Rose::Color::ColorizationParser::parse ( const char *  input,
const char **  rest 
)
static

Parse a colorized output specification from a C string.

Tries to parse a colorized output specification from the input string, and if successful adjusts rest to point to the first character beyond what was parsed. If a syntax error occurs, then an std::runtime_error is thrown.

static Colorization Rose::Color::ColorizationParser::parse ( const std::string &  input)
static

Parse a colorized output specification from a C++ string.

Tries to parse a colorized output specification from the input string. The string may contain leading and trailing white space, but any extra characters will cause a syntax error. Syntax errors are reported by throwing std::runtime_error. Since the underlying parsing is done on C strings, this function is ill-defined when the input contains NUL bytes.


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