KVIrc 5.2.0
Developer APIs
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
KviRegExp Class Reference

#include <KviRegExp.h>

Public Types

enum  CaseSensitivity { CaseInsensitive = 0 , CaseSensitive = 1 }
 
enum  PatternSyntax { RegExp = 0 , Wildcard = 1 }
 

Public Member Functions

QString cap (int iNth=0) const
 
QStringList capturedTexts () const
 
bool exactMatch (const QString &szStr)
 
int indexIn (const QString &szStr, int offset=0)
 
 KviRegExp (const QString &szPattern=QString(), const KviRegExp::CaseSensitivity cs=CaseSensitive, const KviRegExp::PatternSyntax ps=RegExp)
 
int matchedLength () const
 
 operator QRegularExpression () const
 
const QString & pattern () const
 
void setCaseSensitivity (KviRegExp::CaseSensitivity cs)
 
void setMinimal (bool bMinimal)
 
void setPattern (const QString &szPattern)
 

Static Public Member Functions

static QString escape (const QString &szStr)
 

Private Member Functions

QString getCompletePattern () const
 
QRegularExpression::PatternOptions getPatternOptions () const
 

Private Attributes

bool m_bMinimal
 
KviRegExp::CaseSensitivity m_eCs
 
KviRegExp::PatternSyntax m_ePs
 
QRegularExpressionMatch m_oLastMatch
 
QString m_szPattern
 

Member Enumeration Documentation

◆ CaseSensitivity

Enumerator
CaseInsensitive 
CaseSensitive 

◆ PatternSyntax

Enumerator
RegExp 
Wildcard 

Constructor & Destructor Documentation

◆ KviRegExp()

KviRegExp::KviRegExp ( const QString &  szPattern = QString(),
const KviRegExp::CaseSensitivity  cs = CaseSensitive,
const KviRegExp::PatternSyntax  ps = RegExp 
)

Member Function Documentation

◆ cap()

QString KviRegExp::cap ( int  iNth = 0) const

◆ capturedTexts()

QStringList KviRegExp::capturedTexts ( ) const

◆ escape()

static QString KviRegExp::escape ( const QString &  szStr)
inlinestatic

◆ exactMatch()

bool KviRegExp::exactMatch ( const QString &  szStr)

◆ getCompletePattern()

QString KviRegExp::getCompletePattern ( ) const
private

References m_ePs, m_szPattern, and Wildcard.

Referenced by exactMatch(), and indexIn().

◆ getPatternOptions()

QRegularExpression::PatternOptions KviRegExp::getPatternOptions ( ) const
private

References CaseInsensitive, m_bMinimal, and m_eCs.

Referenced by exactMatch(), and indexIn().

◆ indexIn()

int KviRegExp::indexIn ( const QString &  szStr,
int  offset = 0 
)

◆ matchedLength()

int KviRegExp::matchedLength ( ) const

◆ operator QRegularExpression()

KviRegExp::operator QRegularExpression ( ) const
inline

◆ pattern()

const QString & KviRegExp::pattern ( ) const
inline

◆ setCaseSensitivity()

void KviRegExp::setCaseSensitivity ( KviRegExp::CaseSensitivity  cs)
inline

◆ setMinimal()

void KviRegExp::setMinimal ( bool  bMinimal)
inline

◆ setPattern()

void KviRegExp::setPattern ( const QString &  szPattern)
inline

Member Data Documentation

◆ m_bMinimal

bool KviRegExp::m_bMinimal
private

Referenced by getPatternOptions().

◆ m_eCs

KviRegExp::CaseSensitivity KviRegExp::m_eCs
private

Referenced by getPatternOptions().

◆ m_ePs

KviRegExp::PatternSyntax KviRegExp::m_ePs
private

Referenced by getCompletePattern().

◆ m_oLastMatch

QRegularExpressionMatch KviRegExp::m_oLastMatch
private

◆ m_szPattern

QString KviRegExp::m_szPattern
private

Referenced by getCompletePattern().


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