ArcadeExpression Class

  • ArcadeExpression
  • class Esri::ArcGISRuntime::ArcadeExpression

    An Arcade expression object, containing an expression, a name, a return type and a title. More...

    Header: #include <ArcadeExpression.h>
    Since: Esri::ArcGISRuntime 100.11
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::JsonSerializable

    This class was introduced in Esri::ArcGISRuntime 100.11.

    Public Functions

    ArcadeExpression(const QString &expression, const QString &title, const QString &name, Esri::ArcGISRuntime::ArcadeExpressionReturnType returnType, QObject *parent = nullptr)
    ArcadeExpression(const QString &expression, const QString &title, const QString &name, QObject *parent = nullptr)
    ArcadeExpression(const QString &expression, QObject *parent = nullptr)
    virtual ~ArcadeExpression() override
    bool equals(Esri::ArcGISRuntime::ArcadeExpression *other) const
    QString expression() const
    QString name() const
    Esri::ArcGISRuntime::ArcadeExpressionReturnType returnType() const
    QString title() const

    Reimplemented Public Functions

    virtual QString toJson() const override
    virtual QJsonObject unknownJson() const override
    virtual QJsonObject unsupportedJson() const override

    Static Public Members

    Esri::ArcGISRuntime::ArcadeExpression *fromJson(const QString &json, QObject *parent = nullptr)

    Detailed Description

    An ArcadeExpression object gathers an Arcade script expression together with: - the expected return type - the name that a map author uses to refer to it - the title that the author uses to describe the expression.

    Member Function Documentation

    ArcadeExpression::ArcadeExpression(const QString &expression, const QString &title, const QString &name, Esri::ArcGISRuntime::ArcadeExpressionReturnType returnType, QObject *parent = nullptr)

    Creates a new ArcadeExpression object

    If the Arcade expression creates results of a different type (for example, a Date or an Array), then the result will be cast to the expected return type. If no sensible cast can be carried out, then the result will be null.

    ArcadeExpression::ArcadeExpression(const QString &expression, const QString &title, const QString &name, QObject *parent = nullptr)

    Creates a new ArcadeExpression object

    • expression - The Arcade expression to be evaluated.
    • title - The title of the expression.
    • name - The name of the expression.
    • parent - The optional parent QObject.

    The returnType will default to ArcadeExpressionReturnType::Automatic.

    ArcadeExpression::ArcadeExpression(const QString &expression, QObject *parent = nullptr)

    Creates a new ArcadeExpression object with an expression script.

    • expression - The Arcade expression to be evaluated.
    • parent - The optional parent QObject.

    The name and title will default to empty strings. The returnType will default to ArcadeExpressionReturnType::Automatic.

    [override virtual] ArcadeExpression::~ArcadeExpression()

    Destructor.

    bool ArcadeExpression::equals(Esri::ArcGISRuntime::ArcadeExpression *other) const

    Returns tests if two ArcadeExpression objects are equal.

    • other - The second object.

    QString ArcadeExpression::expression() const

    Returns the Arcade expression string.

    [static] Esri::ArcGISRuntime::ArcadeExpression *ArcadeExpression::fromJson(const QString &json, QObject *parent = nullptr)

    Creates a new ArcadeExpression from json with an optional parent.

    See also JsonSerializable.

    QString ArcadeExpression::name() const

    Returns the name that the author uses to refer to the expression.

    If not set explicitly, then the default is an empty name string.

    Esri::ArcGISRuntime::ArcadeExpressionReturnType ArcadeExpression::returnType() const

    Returns the expected return type of the expression.

    If the Arcade expression creates results of a different type (for example, a Date or an Array), then the result will be cast to the expected return type. If no sensible cast can be carried out, then the result will be null.

    QString ArcadeExpression::title() const

    Returns the title that the author uses to describe the expression.

    If not set explicitly, then the default is an empty title string.

    [override virtual] QString ArcadeExpression::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Gets the json representation of this object.

    See also JsonSerializable.

    [override virtual] QJsonObject ArcadeExpression::unknownJson() const

    Reimplements: JsonSerializable::unknownJson() const.

    Gets the unknown JSON of this object.

    See also JsonSerializable.

    [override virtual] QJsonObject ArcadeExpression::unsupportedJson() const

    Reimplements: JsonSerializable::unsupportedJson() const.

    Gets the unsupported JSON of this object.

    See also JsonSerializable.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.