Inherits YGP::IRegularExpression.
Public Member Functions | |
| FileRegularExpr (const char *pRegExp) | |
| virtual | ~FileRegularExpr () |
| virtual int | checkIntegrity () const throw (std::invalid_argument) |
| FileRegularExpr & | operator= (const char *pRegExp) |
Protected Member Functions | |
| virtual bool | compare (const char *pAktRegExp, const char *pCompare) |
The pExpression-parameter is stored as is (and not copied); so take care it is valid during the life-time of the object.
| YGP::FileRegularExpr::FileRegularExpr | ( | const char * | pRegExp | ) | [inline] |
Constructor; sets the regular expression to match.
| YGP::FileRegularExpr::~FileRegularExpr | ( | ) | [virtual] |
Destructor.
| int YGP::FileRegularExpr::checkIntegrity | ( | ) | const throw (std::invalid_argument) [virtual] |
Checks the syntax of the regular expression.
If everything is OK, 0 is returned; 1 if there is no regular expression at all. In case of any other error an exception is thrown.
| std::invalid_argument | In case of an invalid regexp a describing text |
Reimplemented from YGP::IRegularExpression.
| bool YGP::FileRegularExpr::compare | ( | const char * | pAktRegExp, | |
| const char * | pCompare | |||
| ) | [protected, virtual] |
Checks if the passed text matches the passed regular expression.
Both passed parameter must not be NULL-pointers and the regular expression must be in a valid syntax (this can be checked with the checkIntegrity()-method).
| pAktRegExp | Pointer to character array holding regular expression | |
| pCompare | Pointer to character array holding value to compare |
pAktRegExp, pCompare must be ASCIIZ-strings Implements YGP::IRegularExpression.
| FileRegularExpr& YGP::FileRegularExpr::operator= | ( | const char * | pRegExp | ) | [inline] |
Assignmentoperator; specifies the regular expression to match.
Reimplemented from YGP::IRegularExpression.