Inherits YGP::ParseAttomic.
Inherited by YGP::CBParseExact, YGP::OFParseExact< T >, and YGP::ParseUpperExact.
Public Types | |
| enum | { POS_ERROR = ParseAttomic::LAST, LAST } |
Public Member Functions | |
| ParseExact (const char *value, const char *description, bool skipWhitespace=true, bool reportData=true) | |
| ParseExact (const char *value, const char *description, unsigned int max, unsigned int min, bool skipWhitespace=true, bool reportData=true) | |
| ParseExact (const ParseExact &other) | |
| virtual | ~ParseExact () |
| ParseExact & | operator= (const ParseExact &other) |
Protected Member Functions | |
| virtual int | checkIntegrity () const |
| virtual int | checkValue (char ch) |
The min- and max-members are not totally wasted; they could be used to define the minimal length of certain keywords which would be valid even if just written in a short(er) form and/or to include values with a zero ('\0') character (although the main reason for them is that I didn't want to re-consider the class-hierarchy anymore).
| YGP::ParseExact::ParseExact | ( | const char * | value, | |
| const char * | description, | |||
| bool | skipWhitespace = true, |
|||
| bool | reportData = true | |||
| ) |
Constructor.
Constructor; sets the neccessary data of this object.
| value | Sequence of characters to parse in that order | |
| description | Description of the object (what it parses) | |
| skipWhitespace | Flag if trailing whitespaces should be skipped after sucessfully parsing the object | |
| reportData | Flag, if data should be stored and reported |
| YGP::ParseExact::ParseExact | ( | const char * | value, | |
| const char * | description, | |||
| unsigned int | max, | |||
| unsigned int | min, | |||
| bool | skipWhitespace = true, |
|||
| bool | reportData = true | |||
| ) | [inline] |
Constructor with explicit length of the object to parse.
| YGP::ParseExact::ParseExact | ( | const ParseExact & | other | ) | [inline] |
Copy constructor.
| YGP::ParseExact::~ParseExact | ( | ) | [virtual] |
Destructor.
| int YGP::ParseExact::checkIntegrity | ( | ) | const [protected, virtual] |
Checks the constraints of the object.
Reimplemented from YGP::ParseAttomic.
Reimplemented in YGP::ParseUpperExact.
| int YGP::ParseExact::checkValue | ( | char | ch | ) | [protected, virtual] |
Checks if the passed character is exactly equal (case-sensitive!) than the one in the actual position of the object.
| ch | Char to check |
Reimplemented from YGP::ParseAttomic.
Reimplemented in YGP::ParseUpperExact.
| ParseExact & YGP::ParseExact::operator= | ( | const ParseExact & | other | ) |