A function that samples a DiscreteField when evaluated, returning a DiscreteFieldSample. More...
| Header | #include <Discrete |
| Since | Esri |
| Inherits | Esri |
Public Functions
| virtual | ~ |
| QFuture | evaluate |
| Esri | position() const |
| void | set |
Static Public Members
| Esri | create( |
| Esri | create( |
Detailed Description
Use evaluateAsync to compute the result of this function.
After updating parameters of this function, or of functions from which it is composed, evaluation uses the updated parameter values and may produce an updated result.
See also DiscreteField, DiscreteFieldFunction, and DiscreteFieldSample.
Member Function Documentation
[override virtual noexcept] DiscreteFieldSampleFunction::~DiscreteFieldSampleFunction ()
Destructor.
[static] Esri::ArcGISRuntime::DiscreteFieldSampleFunction *DiscreteFieldSampleFunction::create(Esri::ArcGISRuntime::DiscreteFieldFunction *field, QObject *parent = nullptr)
Creates a DiscreteFieldSampleFunction with an empty initial position.
- field - A function that returns the DiscreteField to sample.
- parent - The optional parent QObject.
evaluateAsync fails if position is empty. However, creating a DiscreteFieldSampleFunction with no position can be useful in an interactive or dynamic analysis. An empty initial position lets you define an interactive or dynamic analysis before its position is available. You can then defer evaluation until a position has been populated.
See also DiscreteFieldFunction::sample.
[static] Esri::ArcGISRuntime::DiscreteFieldSampleFunction *DiscreteFieldSampleFunction::create(Esri::ArcGISRuntime::DiscreteFieldFunction *field, const Esri::ArcGISRuntime::Point &position, QObject *parent = nullptr)
Creates a DiscreteFieldSampleFunction.
- field - A function that returns the DiscreteField to sample.
- position - The position at which to sample the DiscreteField.
- parent - The optional parent QObject.
evaluateAsync fails if Esri::ArcGISRuntime::DiscreteFieldSampleFunction::position is empty. However, creating a DiscreteFieldSampleFunction with no position can be useful in an interactive or dynamic analysis. An empty initial position lets you define an interactive or dynamic analysis before its position is available. You can then defer evaluation until a position has been populated.
See also DiscreteFieldFunction::sample.
QFuture<Esri::ArcGISRuntime::DiscreteFieldSample *> DiscreteFieldSampleFunction::evaluateAsync (QObject *parent = nullptr)
Evaluates the function with an optional parent for the returned sample.
Evaluation fails if position is empty.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
Esri::ArcGISRuntime::Point DiscreteFieldSampleFunction::position() const
Returns the position at which to sample the DiscreteField.
After changing the position, evaluation uses the updated position to produce an updated result.
See also setPosition().
void DiscreteFieldSampleFunction::setPosition (const Esri::ArcGISRuntime::Point &position)
Sets the position to position.
See also position.