![]() |
Qt 6.x
The Qt SDK
|
#include <qmimemagicrule_p.h>
Public Types | |
enum | Type { Invalid = 0 , String , Host16 , Host32 , Big16 , Big32 , Little16 , Little32 , Byte } |
Public Member Functions | |
QMimeMagicRule (const QString &typeStr, const QByteArray &value, const QString &offsets, const QByteArray &mask, QString *errorString) | |
void | swap (QMimeMagicRule &other) noexcept |
bool | operator== (const QMimeMagicRule &other) const |
Type | type () const |
QByteArray | value () const |
int | startPos () const |
int | endPos () const |
QByteArray | mask () const |
bool | isValid () const |
bool | matches (const QByteArray &data) const |
Static Public Member Functions | |
static Type | type (const QByteArray &type) |
static QByteArray | typeName (Type type) |
static bool | matchSubstring (const char *dataPtr, qsizetype dataSize, int rangeStart, int rangeLength, qsizetype valueLength, const char *valueData, const char *mask) |
Public Attributes | |
QList< QMimeMagicRule > | m_subMatches |
Definition at line 28 of file qmimemagicrule_p.h.
enum QMimeMagicRule::Type |
Enumerator | |
---|---|
Invalid | |
String | |
Host16 | |
Host32 | |
Big16 | |
Big32 | |
Little16 | |
Little32 | |
Byte |
Definition at line 31 of file qmimemagicrule_p.h.
QMimeMagicRule::QMimeMagicRule | ( | const QString & | typeStr, |
const QByteArray & | value, | ||
const QString & | offsets, | ||
const QByteArray & | mask, | ||
QString * | errorString | ||
) |
Definition at line 187 of file qmimemagicrule.cpp.
References Big16, Big32, Byte, QByteArray::constData(), QByteArray::fill(), QByteArray::fromHex(), QByteArray::fromRawData(), Host16, Host32, QString::indexOf(), Invalid, QByteArray::isEmpty(), Little16, Little32, makePattern(), QStringView::mid(), ok, QMimeTypeParserBase::parseNumber(), Q_FALLTHROUGH, Q_UNLIKELY, QStringLiteral, QByteArray::size(), QByteArray::squeeze(), QByteArray::startsWith(), String, and QByteArray::toUInt().
|
inline |
Definition at line 54 of file qmimemagicrule_p.h.
|
inline |
Definition at line 57 of file qmimemagicrule_p.h.
QByteArray QMimeMagicRule::mask | ( | ) | const |
Definition at line 296 of file qmimemagicrule.cpp.
References String, and QByteArray::toHex().
bool QMimeMagicRule::matches | ( | const QByteArray & | data | ) | const |
Definition at line 306 of file qmimemagicrule.cpp.
References QList< T >::begin(), QList< T >::end(), QList< T >::isEmpty(), it, m_subMatches, and ok.
|
static |
bool QMimeMagicRule::operator== | ( | const QMimeMagicRule & | other | ) | const |
Definition at line 50 of file qmimemagicrule.cpp.
References other().
|
inline |
Definition at line 53 of file qmimemagicrule_p.h.
|
inlinenoexcept |
Definition at line 36 of file qmimemagicrule_p.h.
References other(), and qSwap().
|
inline |
Definition at line 51 of file qmimemagicrule_p.h.
|
static |
Definition at line 36 of file qmimemagicrule.cpp.
References Byte, i, Invalid, magicRuleTypes, and String.
|
static |
Definition at line 45 of file qmimemagicrule.cpp.
References magicRuleTypes.
|
inline |
Definition at line 52 of file qmimemagicrule_p.h.
QList<QMimeMagicRule> QMimeMagicRule::m_subMatches |
Definition at line 61 of file qmimemagicrule_p.h.
Referenced by matches().