#include <albert/matcher.h>
Augmented match score.
Some nifty features:
- The bool type conversion evaluates to isMatch()
- The Score/double type conversion seamlessly uses the score()
- See also
- Matcher
|
| Match () |
| Constructs an invalid match.
|
|
| Match (const Score score) |
| Constructs a match with the given score .
|
|
| Match (const Match &o)=default |
| Constructs a Match with the score of other .
|
|
Match & | operator= (const Match &o)=default |
| Replaces the score with that of other .
|
|
bool | isMatch () const |
| Returns true if this is a match, otherwise returns false .
|
|
bool | isEmptyMatch () const |
| Returns true if this is a zero score match, otherwise returns false .
|
|
bool | isExactMatch () const |
| Returns true if this is a perfect match, otherwise returns false .
|
|
Score | score () const |
| Returns the score.
|
|
| operator bool () const |
| Returns true if this is a match, otherwise returns false .
|
|
| operator Score () const |
| Returns the score.
|
|
◆ Score
◆ Match() [1/3]
Constructs an invalid match.
◆ Match() [2/3]
albert::Match::Match |
( |
const Score |
score | ) |
|
|
inline |
Constructs a match with the given score
.
◆ Match() [3/3]
albert::Match::Match |
( |
const Match & |
o | ) |
|
|
default |
Constructs a Match with the score of other
.
◆ isEmptyMatch()
bool albert::Match::isEmptyMatch |
( |
| ) |
const |
|
inline |
Returns true
if this is a zero score match, otherwise returns false
.
◆ isExactMatch()
bool albert::Match::isExactMatch |
( |
| ) |
const |
|
inline |
Returns true
if this is a perfect match, otherwise returns false
.
◆ isMatch()
bool albert::Match::isMatch |
( |
| ) |
const |
|
inline |
Returns true
if this is a match, otherwise returns false
.
◆ operator bool()
albert::Match::operator bool |
( |
| ) |
const |
|
inline |
Returns true
if this is a match, otherwise returns false
.
◆ operator Score()
albert::Match::operator Score |
( |
| ) |
const |
|
inlineexplicit |
◆ operator=()
Match & albert::Match::operator= |
( |
const Match & |
o | ) |
|
|
default |
Replaces the score with that of other
.
◆ score()
Score albert::Match::score |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: