CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
CartoType::TStringMatchMethod Class Reference

#include <cartotype_string.h>

Public Member Functions

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

Static Public Member Functions

static TStringMatchMethod FromFlags (unsigned int aFlags)
 

Static Public Attributes

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

Detailed Description

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

Constructor & Destructor Documentation

◆ TStringMatchMethod()

Creates a TStringMatchMethod 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 CartoType::TStringMatchMethod::Flags ( ) const
inline

Returns the integer value of the flags.

◆ FromFlags()

static TStringMatchMethod CartoType::TStringMatchMethod::FromFlags ( unsigned int  aFlags)
inlinestatic

Creates a TStringMatchMethod object from an integer containing TStringMatchMethodFlag values.

◆ Ignore()

bool CartoType::TStringMatchMethod::Ignore ( int32_t  aCharCode) const

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

◆ operator!=()

bool CartoType::TStringMatchMethod::operator!= ( TStringMatchMethod  aOther) const
inline

The inequality operator.

◆ operator&()

bool CartoType::TStringMatchMethod::operator& ( TStringMatchMethodFlag  aFlag) const
inline

Returns true if aFlag is set.

◆ operator+=()

TStringMatchMethod CartoType::TStringMatchMethod::operator+= ( TStringMatchMethodFlag  aFlag)
inline

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

◆ operator-=()

TStringMatchMethod CartoType::TStringMatchMethod::operator-= ( TStringMatchMethodFlag  aFlag)
inline

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

◆ operator==()

bool CartoType::TStringMatchMethod::operator== ( TStringMatchMethod  aOther) const
inline

The equality operator.

Member Data Documentation

◆ Exact

const TStringMatchMethod CartoType::TStringMatchMethod::Exact = TStringMatchMethod()
static

Strings must match exactly.

◆ Fold

Fold (ignore) case and accents when matching strings.

◆ FoldAccents

const TStringMatchMethod CartoType::TStringMatchMethod::FoldAccents = TStringMatchMethod(TStringMatchMethodFlag::FoldAccents)
static

Fold (ignore) accents when matching strings.

◆ FoldCase

const TStringMatchMethod CartoType::TStringMatchMethod::FoldCase = TStringMatchMethod(TStringMatchMethodFlag::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 TStringMatchMethod CartoType::TStringMatchMethod::Prefix = TStringMatchMethod(TStringMatchMethodFlag::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: