KItinerary::ExtractorDocumentProcessor

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

bool ExtractorDocumentProcessor::canHandleData ( const QByteArray encodedData,
QStringView  fileName 
) const
virtual
QJSValue ExtractorDocumentProcessor::contentToScriptValue ( const ExtractorDocumentNode node,
QJSEngine engine 
) const
virtual

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 86 of file extractordocumentprocessor.cpp.

ExtractorDocumentNode ExtractorDocumentProcessor::createNodeFromContent ( const QVariant decodedData) const
virtual

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 29 of file extractordocumentprocessor.cpp.

void ExtractorDocumentProcessor::destroyNode ( ExtractorDocumentNode node) const
virtual

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 91 of file extractordocumentprocessor.cpp.

void ExtractorDocumentProcessor::expandNode ( ExtractorDocumentNode node,
const ExtractorEngine engine 
) const
virtual
bool ExtractorDocumentProcessor::matches ( const ExtractorFilter filter,
const ExtractorDocumentNode node 
) const
virtual

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 51 of file extractordocumentprocessor.cpp.

void ExtractorDocumentProcessor::postExtract ( ExtractorDocumentNode node) const
virtual

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 82 of file extractordocumentprocessor.cpp.

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

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 47 of file extractordocumentprocessor.cpp.

void ExtractorDocumentProcessor::reduceNode ( ExtractorDocumentNode node) const
virtual

Propagate results from child nodes up to node.

The default implementation just appends results.

Definition at line 40 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-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:06:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.