TaskWatcher Class

  • TaskWatcher
  • class Esri::ArcGISRuntime::TaskWatcher

    Information about the state of a running task with cancel support. More...

    Header: #include <TaskWatcher.h>
    Since: Esri::ArcGISRuntime 100.0

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    TaskWatcher(Esri::ArcGISRuntime::TaskWatcher &&other)
    TaskWatcher(const Esri::ArcGISRuntime::TaskWatcher &other)
    TaskWatcher()
    Esri::ArcGISRuntime::TaskWatcher &operator=(Esri::ArcGISRuntime::TaskWatcher &&other)
    Esri::ArcGISRuntime::TaskWatcher &operator=(const Esri::ArcGISRuntime::TaskWatcher &other)
    ~TaskWatcher()
    bool cancel()
    QString description() const
    bool isCanceled() const
    bool isDone() const
    bool isValid() const
    QUuid taskId() const

    Detailed Description

    TaskWatcher supports examining the state of a task along with the ability to cancel a task.

    This class is only copyable for convenience. All copies are shallow copies and reference the same underlying task.

    Member Function Documentation

    TaskWatcher::TaskWatcher(Esri::ArcGISRuntime::TaskWatcher &&other)

    Move constructor from other TaskWatcher.

    TaskWatcher::TaskWatcher(const Esri::ArcGISRuntime::TaskWatcher &other)

    Copy constructor from other TaskWatcher.

    Note: Both copies will reference the same underlying task.

    TaskWatcher::TaskWatcher()

    Default constructor.

    Esri::ArcGISRuntime::TaskWatcher &TaskWatcher::operator=(Esri::ArcGISRuntime::TaskWatcher &&other)

    Move operator from other TaskWatcher.

    Esri::ArcGISRuntime::TaskWatcher &TaskWatcher::operator=(const Esri::ArcGISRuntime::TaskWatcher &other)

    Copy assignment from other TaskWatcher.

    Note: Both copies will reference the same underlying task.

    TaskWatcher::~TaskWatcher()

    Destructor.

    bool TaskWatcher::cancel()

    Cancels the task.

    Returns true if the task was canceled successfully.

    QString TaskWatcher::description() const

    Gets the unique task description.

    The task description will be a simple description of the task, for example, the task function name.

    Returns the task description.

    bool TaskWatcher::isCanceled() const

    Gets whether the task was canceled.

    Returns true if the task was canceled.

    bool TaskWatcher::isDone() const

    Gets whether the task has come to a terminal state, either canceled or completed.

    Returns true if the task is done.

    bool TaskWatcher::isValid() const

    Gets whether the task was created successfully.

    Returns true if the task could be created, otherwise false. If false, then the task's corresponding completed signal will never emit.

    QUuid TaskWatcher::taskId() const

    Gets the unique task ID associated with this task.

    Returns the task id.

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