YGP::ParseUpperExact Class Reference

Class to parse exactly a certain text (not case-sensitive!). More...

Inherits YGP::ParseExact.

Inherited by YGP::CBParseUpperExact, and YGP::OFParseUpperExact< T >.

List of all members.

Public Member Functions

 ParseUpperExact (const char *value, const char *description, bool skipWhitespace=true, bool reportData=true)
 ParseUpperExact (const char *value, const char *description, unsigned int max, unsigned int min, bool skipWhitespace=true, bool reportData=true)
 ParseUpperExact (const ParseUpperExact &other)
virtual ~ParseUpperExact ()
ParseUpperExactoperator= (const ParseUpperExact &other)

Protected Types

enum  { VALUE_NOT_UPPERCASE = ParseExact::LAST, LAST }

Protected Member Functions

virtual int checkValue (char ch)
virtual int checkIntegrity () const


Detailed Description

Class to parse exactly a certain text (not case-sensitive!).

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).

Note:
This class uses strlen to get the length of its value so don't use its first constructor to check for text with a '\0' inside!
See ParseObject for a general description of the parser.

Constructor & Destructor Documentation

YGP::ParseUpperExact::ParseUpperExact ( const char *  value,
const char *  description,
bool  skipWhitespace = true,
bool  reportData = true 
) [inline]

Constructor.

YGP::ParseUpperExact::ParseUpperExact ( 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::ParseUpperExact::ParseUpperExact ( const ParseUpperExact other  )  [inline]

Copy constructor.

YGP::ParseUpperExact::~ParseUpperExact (  )  [virtual]

Destructor.


Member Function Documentation

int YGP::ParseUpperExact::checkIntegrity (  )  const [protected, virtual]

Checks the constraints of the object.

Returns:
int Status; 0 OK

Reimplemented from YGP::ParseExact.

int YGP::ParseUpperExact::checkValue ( char  ch  )  [protected, virtual]

Checks if the passed character is exactly equal (not case-sensitive!) than the one in the actual position of the object.

Parameters:
ch Char to check
Returns:
int Result; !0 if valid

Reimplemented from YGP::ParseExact.

ParseUpperExact& YGP::ParseUpperExact::operator= ( const ParseUpperExact other  )  [inline]

Assignment operator.


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

YGP Version 0.9.31 - Generated on Wed Nov 18 11:25:27 2009 by doxygen 1.5.8