KItinerary::ExtractorValidator
#include <extractorvalidator.h>
Public Member Functions | |
ExtractorValidator (const ExtractorValidator &)=delete | |
ExtractorValidator (ExtractorValidator &&) noexcept | |
bool | isValidElement (const QVariant &elem) const |
ExtractorValidator & | operator= (const ExtractorValidator &)=delete |
ExtractorValidator & | operator= (ExtractorValidator &&) noexcept |
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()
|
nodiscard |
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 230 of file extractorvalidator.cpp.
◆ setAcceptedTypes() [1/2]
|
inline |
Convenience overload of setAcceptedTypes().
Definition at line 48 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 59 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 64 of file extractorvalidator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.