QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
QgsAbstractMetadataBaseValidator Class Referenceabstract

Abstract base class for metadata validators. More...

#include <qgslayermetadatavalidator.h>

Inheritance diagram for QgsAbstractMetadataBaseValidator:
Inheritance graph
[legend]

Classes

class  ValidationResult
 Contains the parameters describing a metadata validation failure. More...
 

Public Member Functions

virtual ~QgsAbstractMetadataBaseValidator ()=default
 
virtual bool validate (const QgsAbstractMetadataBase *metadata, QList< QgsAbstractMetadataBaseValidator::ValidationResult > &results) const =0
 Validates a metadata object, and returns true if the metadata is considered valid.
 

Detailed Description

Abstract base class for metadata validators.

Definition at line 35 of file qgslayermetadatavalidator.h.

Constructor & Destructor Documentation

◆ ~QgsAbstractMetadataBaseValidator()

virtual QgsAbstractMetadataBaseValidator::~QgsAbstractMetadataBaseValidator ( )
virtualdefault

Member Function Documentation

◆ validate()

virtual bool QgsAbstractMetadataBaseValidator::validate ( const QgsAbstractMetadataBase metadata,
QList< QgsAbstractMetadataBaseValidator::ValidationResult > &  results 
) const
pure virtual

Validates a metadata object, and returns true if the metadata is considered valid.

If validation fails, the results list will be filled with a list of items describing why the validation failed and what needs to be rectified to fix the metadata.

Implemented in QgsNativeMetadataBaseValidator, QgsNativeMetadataValidator, and QgsNativeProjectMetadataValidator.


The documentation for this class was generated from the following file: