#include <operatorhinter.h>
Public Types | |
| typedef rulesmanager::IRuleMatcher < std::string >::priority_t | priority_t |
| typedef std::string | RuleType |
Public Member Functions | |
| virtual bool | operator() (const RuleType &original, const RuleType &rule, priority_t *priority) const |
Static Public Attributes | |
| static const priority_t | LOW_PRIORITY = 1 |
| static const priority_t | EXACT_PRIORITY = 2 |
Matcher implementation for string tule type.
Simple matcher two matching rules:
| typedef rulesmanager::IRuleMatcher<std::string>::priority_t configuration::StringMatcher::priority_t |
Priority type.
Reimplemented from rulesmanager::IRuleMatcher< std::string >.
| typedef std::string configuration::StringMatcher::RuleType |
Alias for string RuleType.
| virtual bool configuration::StringMatcher::operator() | ( | const RuleType & | original, | |
| const RuleType & | rule, | |||
| priority_t * | priority | |||
| ) | const [inline, virtual] |
Comparing functor.
| original | Original string to compare with. | |
| rule | Rule string to compare. | |
| priority | Place where to store matching priority (if non NULL). |
If given original is empty string, then everything matches (with LOW_PRIORITY priority), otherwis compares original with given rule (if matches them priority is EXACT_PRIORITY).
If rule matches and priority is non NULL, stores priority of match to the place where given priority parameter points.
References EXACT_PRIORITY, and LOW_PRIORITY.
const priority_t configuration::StringMatcher::EXACT_PRIORITY = 2 [static] |
Exact match priority.
Referenced by operator()().
const priority_t configuration::StringMatcher::LOW_PRIORITY = 1 [static] |
Any match priority. Matching to empty original has this priority.
Referenced by operator()().