configuration::ModeMatcher Class Reference

#include <modecontroller.h>

Inheritance diagram for configuration::ModeMatcher:
rulesmanager::IRuleMatcher< RuleType >

List of all members.

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

Detailed Description

Implementator of IRuleMatcher for ModeRule.

See functor operator for more precise information about mode rules matching evaluation.


Member Typedef Documentation

Type for matching priority. Use betterMatch method for priority comparing.

Reimplemented from rulesmanager::IRuleMatcher< RuleType >.


Member Function Documentation

bool configuration::ModeMatcher::operator() ( const ModeRule original,
const ModeRule rule,
priority_t priority 
) const [virtual]

Determines whether given rule matches given original.

Parameters:
original Original rule.
rule Rule to check whether matches.
priority Place where to store priority of match (only if non NULL and matches).

Rules:

  • original={"", ""} - rule allways matches with PRIO0 priority.
  • original={type, ""} - rule matches if rule.type==original.type with PRIO1 priority.
  • original={"", name} - rule matches if rule.name==original.name with PRIO2 priority.
  • original={type, name} - rule matches if original==rule with PRIO3 priority.
  • PRIO0 < PRIO1 < PRIO2 < PRIO3
Returns:
true if given rule matches original, false otherwise.

References configuration::ModeRule::name, PRIO0, PRIO1, PRIO2, PRIO3, and configuration::ModeRule::type.


Member Data Documentation

Priority for weakest match.

Referenced by operator()().

Priority for type only match.

Referenced by operator()().

Priority for name only match.

Referenced by operator()().

Priority for full match.

Referenced by operator()().


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