CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
CartoTypeCore::StringMatchMethod Class Reference

#include <cartotype_string.h>

Public Member Functions

 StringMatchMethod (StringMatchMethodFlag aFlag1, StringMatchMethodFlag aFlag2=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag3=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag4=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag5=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag6=StringMatchMethodFlag::Exact)
 
StringMatchMethod operator+= (StringMatchMethodFlag aFlag)
 
StringMatchMethod operator-= (StringMatchMethodFlag aFlag)
 
unsigned int Flags () const
 
bool operator& (StringMatchMethodFlag aFlag) const
 
bool AnyAreSet (StringMatchMethodFlag aFlag1, StringMatchMethodFlag aFlag2=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag3=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag4=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag5=StringMatchMethodFlag::Exact, StringMatchMethodFlag aFlag6=StringMatchMethodFlag::Exact) const
 
bool Ignore (int32_t aCharCode) const
 
bool MayIgnoreCharacters () const
 
bool operator== (StringMatchMethod aOther) const
 
bool operator!= (StringMatchMethod aOther) const
 

Static Public Member Functions

static StringMatchMethod FromFlags (unsigned int aFlags)
 

Static Public Attributes

static const StringMatchMethod Exact = StringMatchMethod()
 
static const StringMatchMethod FoldCase = StringMatchMethod(StringMatchMethodFlag::FoldCase)
 
static const StringMatchMethod FoldAccents = StringMatchMethod(StringMatchMethodFlag::FoldAccents)
 
static const StringMatchMethod Fold = StringMatchMethod(StringMatchMethodFlag::FoldCase,StringMatchMethodFlag::FoldAccents)
 
static const StringMatchMethod Prefix = StringMatchMethod(StringMatchMethodFlag::Prefix)
 
static const StringMatchMethod Loose = StringMatchMethod(StringMatchMethodFlag::IgnoreSymbols,StringMatchMethodFlag::IgnoreWhitespace,StringMatchMethodFlag::FoldAccents,StringMatchMethodFlag::FoldCase)
 
static const StringMatchMethod Fuzzy = StringMatchMethod(StringMatchMethodFlag::IgnoreSymbols,StringMatchMethodFlag::IgnoreWhitespace,StringMatchMethodFlag::FoldAccents,StringMatchMethodFlag::Fuzzy,StringMatchMethodFlag::FoldCase)
 

Detailed Description

The method used in text searching to match search terms with found strings.

Constructor & Destructor Documentation

◆ StringMatchMethod()

Creates a StringMatchMethod from one or more bit flags, which are ORed together.

Member Function Documentation

◆ AnyAreSet()

Returns true if any of one or more flags are set.

◆ Flags()

unsigned int CartoTypeCore::StringMatchMethod::Flags ( ) const
inline

Returns the integer value of the flags.

◆ FromFlags()

static StringMatchMethod CartoTypeCore::StringMatchMethod::FromFlags ( unsigned int  aFlags)
inlinestatic

Creates a StringMatchMethod object from an integer containing StringMatchMethodFlag values.

◆ Ignore()

bool CartoTypeCore::StringMatchMethod::Ignore ( int32_t  aCharCode) const

Returns true if the Unicode character aCharCode is ignored when this string match method is used.

◆ MayIgnoreCharacters()

bool CartoTypeCore::StringMatchMethod::MayIgnoreCharacters ( ) const
inline

Returns true if any characters are ignored.

◆ operator!=()

bool CartoTypeCore::StringMatchMethod::operator!= ( StringMatchMethod  aOther) const
inline

The inequality operator.

◆ operator&()

bool CartoTypeCore::StringMatchMethod::operator& ( StringMatchMethodFlag  aFlag) const
inline

Returns true if aFlag is set.

◆ operator+=()

StringMatchMethod CartoTypeCore::StringMatchMethod::operator+= ( StringMatchMethodFlag  aFlag)
inline

Adds a new bit flag to a StringMatchMethod. Has no effect if the flag is already set.

◆ operator-=()

StringMatchMethod CartoTypeCore::StringMatchMethod::operator-= ( StringMatchMethodFlag  aFlag)
inline

Removes a bit flag from a StringMatchMethod. Has no effect if the flag is not set.

◆ operator==()

bool CartoTypeCore::StringMatchMethod::operator== ( StringMatchMethod  aOther) const
inline

The equality operator.

Member Data Documentation

◆ Exact

const StringMatchMethod CartoTypeCore::StringMatchMethod::Exact = StringMatchMethod()
static

Strings must match exactly.

◆ Fold

Fold (ignore) case and accents when matching strings.

◆ FoldAccents

const StringMatchMethod CartoTypeCore::StringMatchMethod::FoldAccents = StringMatchMethod(StringMatchMethodFlag::FoldAccents)
static

Fold (ignore) accents when matching strings.

◆ FoldCase

const StringMatchMethod CartoTypeCore::StringMatchMethod::FoldCase = StringMatchMethod(StringMatchMethodFlag::FoldCase)
static

Fold (ignore) letter case when matching strings.

◆ Fuzzy

Allow fuzzy matches: ignore non-alphanumerics, fold accents and allow imperfect matches.

◆ Loose

Loose matching: ignore non-alphanumerics and fold accents and case.

◆ Prefix

const StringMatchMethod CartoTypeCore::StringMatchMethod::Prefix = StringMatchMethod(StringMatchMethodFlag::Prefix)
static

The search term must be an exact match or a prefix of the found string.


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