Inherits YGP::ParseTextEsc.
Inherited by YGP::CBParseQuotedEsc, and YGP::OFParseQuotedEsc< T >.
Public Member Functions | |
ParseQuotedEsc (char quote, const char *description, unsigned int max, unsigned int min=1, char escape= '\\', bool skipWhitespace=true, bool reportData=true) | |
ParseQuotedEsc (const ParseQuotedEsc &other) | |
virtual | ~ParseQuotedEsc () |
ParseQuotedEsc & | operator= (const ParseQuotedEsc &other) |
Protected Member Functions | |
virtual int | checkValue (char ch) |
However, parsing is continued if those characters are preceeded by a escape-character (which "escapes" the special meaning of that character).
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::ParseQuotedEsc::ParseQuotedEsc | ( | char | quote, | |
const char * | description, | |||
unsigned int | max, | |||
unsigned int | min = 1 , |
|||
char | escape = '\\' , |
|||
bool | skipWhitespace = true , |
|||
bool | reportData = true | |||
) |
Constructor; sets the neccessary data of this object.
quote | Character limiting the text | |
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 | |
escape | Character which escapes characters in value | |
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::ParseQuotedEsc::ParseQuotedEsc | ( | const ParseQuotedEsc & | other | ) |
Copy-constructor.
other | Object to clone |
YGP::ParseQuotedEsc::~ParseQuotedEsc | ( | ) | [virtual] |
Destructor.
int YGP::ParseQuotedEsc::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::ParseTextEsc.
ParseQuotedEsc & YGP::ParseQuotedEsc::operator= | ( | const ParseQuotedEsc & | other | ) |