KItinerary::ExtractorValidator

Search for usage in LXR

KItinerary::ExtractorValidator Class Reference

#include <extractorvalidator.h>

Public Member Functions

 ExtractorValidator (const ExtractorValidator &)=delete
 
bool isValidElement (const QVariant &elem) const
 
ExtractorValidatoroperator= (const ExtractorValidator &)=delete
 
template<typename ... Args>
void setAcceptedTypes ()
 
void setAcceptedTypes (std::vector< const QMetaObject * > &&accptedTypes)
 
void setAcceptOnlyCompleteElements (bool completeOnly)
 

Detailed Description

Validates extractor results.

Used to discard incomplete or otherwise invalid data.

Since
20.08

Definition at line 25 of file extractorvalidator.h.

Constructor & Destructor Documentation

◆ ExtractorValidator()

ExtractorValidator::ExtractorValidator ( )

Definition at line 51 of file extractorvalidator.cpp.

Member Function Documentation

◆ isValidElement()

bool ExtractorValidator::isValidElement ( const QVariant & elem) const

Checks if the given element is valid.

This will accept both Reservation object and things that can be reserved as top-level objects.

Definition at line 228 of file extractorvalidator.cpp.

◆ setAcceptedTypes() [1/2]

template<typename ... Args>
void KItinerary::ExtractorValidator::setAcceptedTypes ( )
inline

Convenience overload of setAcceptedTypes().

Definition at line 46 of file extractorvalidator.h.

◆ setAcceptedTypes() [2/2]

void ExtractorValidator::setAcceptedTypes ( std::vector< const QMetaObject * > && accptedTypes)

Sets the list of supported top-level types that should be accepted.

Providing an empty set of types will accept all top-level types. Instances of types inheriting from accepted types are also accepted. Default is to accept all types.

Definition at line 57 of file extractorvalidator.cpp.

◆ setAcceptOnlyCompleteElements()

void ExtractorValidator::setAcceptOnlyCompleteElements ( bool completeOnly)

Configure whether or not to accept also incomplete elements.

The default is true. Accepting incomplete elements is useful if the output is further processed, for example to merge minimal cancellation elements with already existing data. If the output is displayed directly, set this to true.

Definition at line 62 of file extractorvalidator.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:49 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.