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
void setAcceptedTypes (std::vector< const QMetaObject * > &&accptedTypes)
template<typename... Args>
void setAcceptedTypes ()
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

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

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

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

Convenience overload of setAcceptedTypes().

Definition at line 46 of file extractorvalidator.h.

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 58 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-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:05:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.