Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QMimeTypeParserBase Class Referenceabstract

\inmodule QtCore More...

#include <qmimetypeparser_p.h>

+ Inheritance diagram for QMimeTypeParserBase:
+ Collaboration diagram for QMimeTypeParserBase:

Public Member Functions

 QMimeTypeParserBase ()
 
virtual ~QMimeTypeParserBase ()
 
bool parse (QIODevice *dev, const QString &fileName, QString *errorMessage)
 

Static Public Member Functions

static bool parseNumber (QStringView n, int *target, QString *errorMessage)
 

Protected Member Functions

virtual bool process (const QMimeType &t, QString *errorMessage)=0
 Overwrite to process the sequence of parsed data.
 
virtual bool process (const QMimeGlobPattern &t, QString *errorMessage)=0
 
virtual void processParent (const QString &child, const QString &parent)=0
 
virtual void processAlias (const QString &alias, const QString &name)=0
 
virtual void processMagicMatcher (const QMimeMagicRuleMatcher &matcher)=0
 

Detailed Description

\inmodule QtCore

The QMimeTypeParserBase class parses for a sequence of <mime-type> in a generic way.

Calls abstract handler function process for QMimeType it finds.

See also
QMimeDatabase, QMimeMagicRuleMatcher, MagicRule, MagicStringRule, MagicByteRule, GlobPattern
QMimeTypeParser

Definition at line 29 of file qmimetypeparser_p.h.

Constructor & Destructor Documentation

◆ QMimeTypeParserBase()

QMimeTypeParserBase::QMimeTypeParserBase ( )
inline

Definition at line 34 of file qmimetypeparser_p.h.

◆ ~QMimeTypeParserBase()

virtual QMimeTypeParserBase::~QMimeTypeParserBase ( )
inlinevirtual

Definition at line 35 of file qmimetypeparser_p.h.

Member Function Documentation

◆ parse()

◆ parseNumber()

bool QMimeTypeParserBase::parseNumber ( QStringView  n,
int *  target,
QString errorMessage 
)
static

Definition at line 130 of file qmimetypeparser.cpp.

References errorMessage(), ok, and Q_UNLIKELY.

Referenced by QMimeMagicRule::QMimeMagicRule(), and parse().

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

◆ process() [1/2]

virtual bool QMimeTypeParserBase::process ( const QMimeGlobPattern t,
QString errorMessage 
)
protectedpure virtual

Implemented in QMimeTypeParser.

◆ process() [2/2]

bool QMimeTypeParserBase::process ( const QMimeType t,
QString errorMessage 
)
protectedpure virtual

Overwrite to process the sequence of parsed data.

Implemented in QMimeTypeParser.

Referenced by parse().

+ Here is the caller graph for this function:

◆ processAlias()

virtual void QMimeTypeParserBase::processAlias ( const QString alias,
const QString name 
)
protectedpure virtual

Implemented in QMimeTypeParser.

Referenced by parse().

+ Here is the caller graph for this function:

◆ processMagicMatcher()

virtual void QMimeTypeParserBase::processMagicMatcher ( const QMimeMagicRuleMatcher matcher)
protectedpure virtual

Implemented in QMimeTypeParser.

Referenced by parse().

+ Here is the caller graph for this function:

◆ processParent()

virtual void QMimeTypeParserBase::processParent ( const QString child,
const QString parent 
)
protectedpure virtual

Implemented in QMimeTypeParser.

Referenced by parse().

+ Here is the caller graph for this function:

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