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.


Definition at line 25 of file extractorvalidator.h.

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 217 of file extractorvalidator.cpp.

◆ setAcceptedTypes() [1/2]

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

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 55 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 60 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-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:16:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.