Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qbytearraymatcher.cpp File Reference
#include "qbytearraymatcher.h"
#include <limits.h>
+ Include dependency graph for qbytearraymatcher.cpp:

Go to the source code of this file.

Macros

#define REHASH(a)
 

Functions

static QT_BEGIN_NAMESPACE void bm_init_skiptable (const uchar *cc, qsizetype len, uchar *skiptable)
 
static qsizetype bm_find (const uchar *cc, qsizetype l, qsizetype index, const uchar *puc, qsizetype pl, const uchar *skiptable)
 
static qsizetype findChar (const char *str, qsizetype len, char ch, qsizetype from)
 
static qsizetype qFindByteArrayBoyerMoore (const char *haystack, qsizetype haystackLen, qsizetype haystackOffset, const char *needle, qsizetype needleLen)
 
qsizetype qFindByteArray (const char *haystack0, qsizetype haystackLen, qsizetype from, const char *needle, qsizetype needleLen)
 

Macro Definition Documentation

◆ REHASH

#define REHASH (   a)
Value:
if (sl_minus_1 < sizeof(std::size_t) * CHAR_BIT) \
hashHaystack -= std::size_t(a) << sl_minus_1; \
hashHaystack <<= 1
GLboolean GLboolean GLboolean GLboolean a
[7]

Definition at line 247 of file qbytearraymatcher.cpp.

Function Documentation

◆ bm_find()

static qsizetype bm_find ( const uchar cc,
qsizetype  l,
qsizetype  index,
const uchar puc,
qsizetype  pl,
const uchar skiptable 
)
inlinestatic

Definition at line 19 of file qbytearraymatcher.cpp.

Referenced by QByteArrayMatcher::indexIn(), QByteArrayMatcher::indexIn(), QStringMatcher::indexIn(), QStaticByteArrayMatcherBase::indexOfIn(), and qFindByteArrayBoyerMoore().

+ Here is the caller graph for this function:

◆ bm_init_skiptable()

static QT_BEGIN_NAMESPACE void bm_init_skiptable ( const uchar cc,
qsizetype  len,
uchar skiptable 
)
inlinestatic

Definition at line 10 of file qbytearraymatcher.cpp.

References qMin().

Referenced by QByteArrayMatcher::QByteArrayMatcher(), QByteArrayMatcher::QByteArrayMatcher(), qFindByteArrayBoyerMoore(), and QByteArrayMatcher::setPattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findChar()

static qsizetype findChar ( const char *  str,
qsizetype  len,
char  ch,
qsizetype  from 
)
static

Definition at line 216 of file qbytearraymatcher.cpp.

References ch, e, qMax(), and str.

Referenced by qFindByteArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qFindByteArray()

qsizetype qFindByteArray ( const char *  haystack0,
qsizetype  haystackLen,
qsizetype  from,
const char *  needle,
qsizetype  needleLen 
)

Definition at line 255 of file qbytearraymatcher.cpp.

References findChar(), qFindByteArrayBoyerMoore(), and REHASH.

Referenced by QtPrivate::findByteArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qFindByteArrayBoyerMoore()

static qsizetype qFindByteArrayBoyerMoore ( const char *  haystack,
qsizetype  haystackLen,
qsizetype  haystackOffset,
const char *  needle,
qsizetype  needleLen 
)
static

Definition at line 235 of file qbytearraymatcher.cpp.

References bm_find(), and bm_init_skiptable().

Referenced by qFindByteArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: