Search for usage in LXR

#include <extractordocumentprocessor.h>

Inheritance diagram for KItinerary::ExtractorDocumentProcessor:

Public Member Functions

virtual bool canHandleData (const QByteArray &encodedData, QStringView fileName) const
virtual QJSValue contentToScriptValue (const ExtractorDocumentNode &node, QJSEngine *engine) const
virtual ExtractorDocumentNode createNodeFromContent (const QVariant &decodedData) const
virtual ExtractorDocumentNode createNodeFromData (const QByteArray &encodedData) const
virtual void destroyNode (ExtractorDocumentNode &node) const
virtual void expandNode (ExtractorDocumentNode &node, const ExtractorEngine *engine) const
virtual bool matches (const ExtractorFilter &filter, const ExtractorDocumentNode &node) const
virtual void postExtract (ExtractorDocumentNode &node) const
virtual void preExtract (ExtractorDocumentNode &node, const ExtractorEngine *engine) const
virtual void reduceNode (ExtractorDocumentNode &node) const

Protected Member Functions

template<typename T >
void destroyIfOwned (ExtractorDocumentNode &node) const

Static Protected Member Functions

static bool matchesGadget (const ExtractorFilter &filter, const QMetaObject *mo, const void *obj)
template<typename T >
static bool matchesGadget (const ExtractorFilter &filter, const T *obj)

Detailed Description

Abstract base class of a document type processor.

Definition at line 23 of file extractordocumentprocessor.h.

Member Function Documentation

◆ canHandleData()

bool ExtractorDocumentProcessor::canHandleData ( const QByteArray encodedData,
QStringView  fileName 
) const

◆ contentToScriptValue()

QJSValue ExtractorDocumentProcessor::contentToScriptValue ( const ExtractorDocumentNode node,
QJSEngine engine 
) const

Create a QJSValue for the node content.

The default implementation is sufficient if the content is a QObject pointer, QGadget value, or any built-in type.

Reimplemented in KItinerary::IcalEventProcessor, KItinerary::PdfDocumentProcessor, KItinerary::HtmlDocumentProcessor, KItinerary::PkPassDocumentProcessor, and KItinerary::BinaryDocumentProcessor.

Definition at line 104 of file extractordocumentprocessor.cpp.

◆ createNodeFromContent()

ExtractorDocumentNode ExtractorDocumentProcessor::createNodeFromContent ( const QVariant decodedData) const

Create a document node from an already decoded data type.

The default implementation just sets decodedData on the resulting node.

Reimplemented in KItinerary::PdfDocumentProcessor, KItinerary::HtmlDocumentProcessor, KItinerary::MimeDocumentProcessor, and KItinerary::PkPassDocumentProcessor.

Definition at line 30 of file extractordocumentprocessor.cpp.

◆ createNodeFromData()

◆ destroyNode()

void ExtractorDocumentProcessor::destroyNode ( ExtractorDocumentNode node) const

Destroys type-specific data in node.

The default implementation does nothing.

Reimplemented in KItinerary::PdfDocumentProcessor, KItinerary::HtmlDocumentProcessor, KItinerary::PkPassDocumentProcessor, and KItinerary::MimeDocumentProcessor.

Definition at line 109 of file extractordocumentprocessor.cpp.

◆ expandNode()

void ExtractorDocumentProcessor::expandNode ( ExtractorDocumentNode node,
const ExtractorEngine engine 
) const

◆ matches()

bool ExtractorDocumentProcessor::matches ( const ExtractorFilter filter,
const ExtractorDocumentNode node 
) const

Checks whether the given filter matches node.

The default implementation can handle QObject and Q_GADGET types via Qt's property system.

Reimplemented in KItinerary::IcalEventProcessor, KItinerary::MimeDocumentProcessor, KItinerary::IataBcbpDocumentProcessor, KItinerary::TextDocumentProcessor, and KItinerary::BinaryDocumentProcessor.

Definition at line 52 of file extractordocumentprocessor.cpp.

◆ postExtract()

void ExtractorDocumentProcessor::postExtract ( ExtractorDocumentNode node) const

Called after extractors have been applied to node.

This can be used for applying document type specific data to the extracted result. The default implementation does nothing.

Reimplemented in KItinerary::PkPassDocumentProcessor.

Definition at line 100 of file extractordocumentprocessor.cpp.

◆ preExtract()

void ExtractorDocumentProcessor::preExtract ( ExtractorDocumentNode node,
const ExtractorEngine engine 
) const

Called before extractors are applied to node.

This can be used for performing document type specific extraction steps. The default implementation does nothing.

Reimplemented in KItinerary::IcalEventProcessor, KItinerary::ExternalProcessor, KItinerary::HtmlDocumentProcessor, KItinerary::JsonLdDocumentProcessor, KItinerary::PkPassDocumentProcessor, KItinerary::Uic9183DocumentProcessor, KItinerary::IataBcbpDocumentProcessor, and KItinerary::VdvDocumentProcessor.

Definition at line 48 of file extractordocumentprocessor.cpp.

◆ reduceNode()

void ExtractorDocumentProcessor::reduceNode ( ExtractorDocumentNode node) const

Propagate results from child nodes up to node.

The default implementation just appends results.

Definition at line 41 of file extractordocumentprocessor.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Sep 30 2022 04:04:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.