Provides data about the environment in which an Arcade script is evaluated. More...
| Header | #include <Arcade |
| Since | Esri |
| Inherits | Esri |
Public Functions
| virtual | ~ |
| QString | locale() const |
| Esri | portal() const |
| Esri | spatial |
| QString | time |
Static Public Members
| QString | engine |
| QString | version() |
Detailed Description
Member Function Documentation
[override virtual noexcept] ArcadeEnvironment::~ArcadeEnvironment ()
Destructor.
[static] QString ArcadeEnvironment::engineVersion ()
Returns the version of the engine executing Arcade expressions.
QString ArcadeEnvironment::locale() const
Returns the default locale used to execute the Arcade expression.
Uses CLDR/BCP-47 language tag format. If no locale is provided, the system locale is used by default. If an Arcade function accepts a locale override as a parameter, that value takes precedence over this property.
Esri::ArcGISRuntime::Portal *ArcadeEnvironment::portal() const
Returns the default portal the script should reference as its executing owner.
This is used, for example, to determine the user.
When present, ArcadeEvaluator automatically loads this portal during expression evaluation. If the portal fails to load, expression evaluation fails. If no portal is provided, expressions that require a loaded portal may fail to evaluate.
Esri::ArcGISRuntime::SpatialReference ArcadeEnvironment::spatialReference () const
Returns the default spatial reference for Arcade expressions.
If a spatial reference is not provided, a default is used. If an Arcade function accepts a spatial reference override as a parameter, that value takes precedence over this property.
QString ArcadeEnvironment::timeZone () const
Returns the default time zone when executing Arcade expressions.
This value follows Arcade time zone text formats as described in Arcade Date functions: TimeZone.
Accepted values include:
- Text representing an entry in the IANA time zone database. For example,
"America/Los_Angeles". - Text representing a UTC offset in the form
"+/-HH:MM". For example,"+07:00". "UTC"- Coordinated Universal Time."unknown"- removes time zone information for the given value and displays the date and time as defined in the expression.
Note that "system", "default", and "local" are not accepted values for override, as that is the default behavior when no override is provided.
If no time zone is provided, the system time zone is used by default. If an Arcade function accepts a time zone override as a parameter, that value takes precedence over this property.
[static] QString ArcadeEnvironment::version()
Returns the Arcade version.