Albert
Loading...
Searching...
No Matches
albert::Matcher Class Referencefinal

#include <albert/matcher.h>

Detailed Description

Configurable string matcher.

See also
MatchConfig, Match

Public Member Functions

 Matcher (const QString &string, MatchConfig config={})
 Constructs a Matcher with the given string and match config.
 
 Matcher (Matcher &&o)
 Constructs a Matcher with the contents of other using move semantics.
 
Matcheroperator= (Matcher &&o)
 Replaces the contents with those of other using move semantics.
 
 ~Matcher ()
 Destructs the Matcher.
 
const QString & string () const
 Returns the string matched against.
 
Match match (const QString &string) const
 Returns a Match for string.
 
template<typename... Args>
Match match (QString first, Args... args) const
 Returns a Match for the given strings.
 
Match match (std::ranges::range auto &&strings) const
 Returns the max match for strings.
 

Constructor & Destructor Documentation

◆ Matcher() [1/2]

albert::Matcher::Matcher ( const QString &  string,
MatchConfig  config = {} 
)

Constructs a Matcher with the given string and match config.

If config is not provided, a default constructed config is used.

◆ Matcher() [2/2]

albert::Matcher::Matcher ( Matcher &&  o)

Constructs a Matcher with the contents of other using move semantics.

◆ ~Matcher()

albert::Matcher::~Matcher ( )

Destructs the Matcher.

Member Function Documentation

◆ match() [1/3]

Match albert::Matcher::match ( const QString &  string) const

Returns a Match for string.

◆ match() [2/3]

template<typename... Args>
Match albert::Matcher::match ( QString  first,
Args...  args 
) const
inline

Returns a Match for the given strings.

◆ match() [3/3]

Match albert::Matcher::match ( std::ranges::range auto &&  strings) const
inline

Returns the max match for strings.

◆ operator=()

Matcher & albert::Matcher::operator= ( Matcher &&  o)

Replaces the contents with those of other using move semantics.

◆ string()

const QString & albert::Matcher::string ( ) const

Returns the string matched against.


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