configuration::StringMatcher Struct Reference

#include <operatorhinter.h>

Inheritance diagram for configuration::StringMatcher:
rulesmanager::IRuleMatcher< std::string >

List of all members.

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

Detailed Description

Matcher implementation for string tule type.

Simple matcher two matching rules:


Member Typedef Documentation

Priority type.

Reimplemented from rulesmanager::IRuleMatcher< std::string >.

Alias for string RuleType.


Member Function Documentation

virtual bool configuration::StringMatcher::operator() ( const RuleType original,
const RuleType rule,
priority_t priority 
) const [inline, virtual]

Comparing functor.

Parameters:
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.

Returns:
true if rule matches given original, false otherwise.

References EXACT_PRIORITY, and LOW_PRIORITY.


Member Data Documentation

Exact match priority.

Referenced by operator()().

Any match priority. Matching to empty original has this priority.

Referenced by operator()().


The documentation for this struct was generated from the following file: