QGIS API Documentation 4.3.0-Master (c8cdfe19d7b)
Loading...
Searching...
No Matches
QgsEsriArcadeConverter Class Reference

Converts an Esri Arcade script to a QgsExpression. More...

#include <qgsesriarcadeconverter.h>

Public Types

enum class  Result {
  Success , ParserError , InvalidScriptMultiStatements , InvalidScriptIncompatible ,
  UnknownError
}
 Results of converting the Arcade script. More...

Public Member Functions

 QgsEsriArcadeConverter (const QString &script)
 Constructor for QgsEsriArcadeConverter for converting the specified script.
QString errorMessage () const
 Returns the descriptive error message, if an error was obtained while converting the script.
QString expression () const
 Returns the QGIS expression equivalent of the Arcade script, if conversion was successful.
Result result () const
 Returns the result of converting the script.

Detailed Description

Converts an Esri Arcade script to a QgsExpression.

Since
QGIS 4.4

Definition at line 31 of file qgsesriarcadeconverter.h.

Member Enumeration Documentation

◆ Result

enum class QgsEsriArcadeConverter::Result
strong

Results of converting the Arcade script.

Enumerator
Success 

Script was successfully converted.

ParserError 

Script could not be parsed.

InvalidScriptMultiStatements 

Scripts containing multiple statements cannot be converted.

InvalidScriptIncompatible 

Script is incompatible with conversion to a QGIS expression.

UnknownError 

An unknown error occurred while converting the script.

Definition at line 37 of file qgsesriarcadeconverter.h.

Constructor & Destructor Documentation

◆ QgsEsriArcadeConverter()

PRIVATE QgsEsriArcadeConverter::QgsEsriArcadeConverter ( const QString & script)

Constructor for QgsEsriArcadeConverter for converting the specified script.

Definition at line 977 of file qgsesriarcadeconverter.cpp.

Member Function Documentation

◆ errorMessage()

QString QgsEsriArcadeConverter::errorMessage ( ) const
inline

Returns the descriptive error message, if an error was obtained while converting the script.

See also
result()

Definition at line 65 of file qgsesriarcadeconverter.h.

◆ expression()

QString QgsEsriArcadeConverter::expression ( ) const
inline

Returns the QGIS expression equivalent of the Arcade script, if conversion was successful.

Definition at line 70 of file qgsesriarcadeconverter.h.

◆ result()

Result QgsEsriArcadeConverter::result ( ) const
inline

Returns the result of converting the script.

If the conversion was not successful, a descriptive error can be retrieved by errorMessage().

See also
errorMessage()

Definition at line 58 of file qgsesriarcadeconverter.h.


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