Inherits YGP::ParseText.
Inherited by YGP::CBParseQuoted, and YGP::OFParseQuoted< T >.
Public Member Functions | |
ParseQuoted (char quote, const char *description, unsigned int max, unsigned int min=1, bool skipWhitespace=true, bool reportData=true) | |
ParseQuoted (const ParseQuoted &other) | |
virtual | ~ParseQuoted () |
ParseQuoted & | operator= (const ParseQuoted &other) |
Static Public Member Functions | |
static char | getClosingChar (char ch) |
Protected Member Functions | |
virtual int | checkValue (char ch) |
Parsing of this element is stopped, if the closing quote is found (or the maximal cardinality is reached). Note that this closing character is not necessarily the same as the opening one. The following characters have different closing characters (for all others opening and closing quote are the same):
See ParseObject for a general description of the parser.
YGP::ParseQuoted::ParseQuoted | ( | char | quote, | |
const char * | description, | |||
unsigned int | max, | |||
unsigned int | min = 1 , |
|||
bool | skipWhitespace = true , |
|||
bool | reportData = true | |||
) |
Constructor; sets the neccessary data of this object.
quote | Character limiting the text; the equivalent characters ends parsing. | |
description | Description of the object (what it parses) | |
max | Maximal cardinality, how often can the object be parsed | |
min | Minimal cardinality, how often must the object be parsed | |
skipWhitespace | Flag if trailing whitespaces should be skipped after sucessfully parsing the object | |
reportData | Flag if parsed data should be stored and reported via the virtual found method |
YGP::ParseQuoted::ParseQuoted | ( | const ParseQuoted & | other | ) |
Copy-constructor.
other | Object to clone |
YGP::ParseQuoted::~ParseQuoted | ( | ) | [virtual] |
Destructor.
int YGP::ParseQuoted::checkValue | ( | char | ch | ) | [protected, virtual] |
Checks if the parsed value is according the quote.
The quotes themself are also valid, though not included in the output. Valid are every characters NOT in pValue.
ch | Char to check |
Reimplemented from YGP::ParseText.
char YGP::ParseQuoted::getClosingChar | ( | char | ch | ) | [static] |
Returns the matching "closing" character to the passed one.
This is considered to be:
ch | Char to find match to |
ParseQuoted & YGP::ParseQuoted::operator= | ( | const ParseQuoted & | other | ) |