#include <modecontroller.h>
Public Types | |
| typedef IModeMatcher::priority_t | priority_t |
Public Member Functions | |
| virtual bool | operator() (const ModeRule &original, const ModeRule &rule, priority_t *priority) const |
Static Public Attributes | |
| static const priority_t | PRIO0 = 0 |
| static const priority_t | PRIO1 = 1 |
| static const priority_t | PRIO2 = 2 |
| static const priority_t | PRIO3 = 3 |
Implementator of IRuleMatcher for ModeRule.
See functor operator for more precise information about mode rules matching evaluation.
Type for matching priority. Use betterMatch method for priority comparing.
Reimplemented from rulesmanager::IRuleMatcher< RuleType >.
| bool configuration::ModeMatcher::operator() | ( | const ModeRule & | original, | |
| const ModeRule & | rule, | |||
| priority_t * | priority | |||
| ) | const [virtual] |
Determines whether given rule matches given original.
| original | Original rule. | |
| rule | Rule to check whether matches. | |
| priority | Place where to store priority of match (only if non NULL and matches). |
Rules:
References configuration::ModeRule::name, PRIO0, PRIO1, PRIO2, PRIO3, and configuration::ModeRule::type.
const priority_t configuration::ModeMatcher::PRIO0 = 0 [static] |
Priority for weakest match.
Referenced by operator()().
const priority_t configuration::ModeMatcher::PRIO1 = 1 [static] |
Priority for type only match.
Referenced by operator()().
const priority_t configuration::ModeMatcher::PRIO2 = 2 [static] |
Priority for name only match.
Referenced by operator()().
const priority_t configuration::ModeMatcher::PRIO3 = 3 [static] |
Priority for full match.
Referenced by operator()().