Marker interface inherited by classes that can load data asynchronously. More...
|virtual void||cancelLoad() = 0|
|virtual void||load() = 0|
|virtual Error||loadError() const = 0|
|virtual LoadStatus||loadStatus() const = 0|
|virtual void||retryLoad() = 0|
Marker interface inherited by classes that can load data asynchronously.
A pure virtual interface implemented by classes whose objects can load data asynchronously, for example, from a remote network location or the local file system. Call
load() to initiate loading. The
loadStatus() property reflects the status of the load operation.
All classes that implement Loadable include two signals.
void Loadable::doneLoading(Esri::ArcGISRuntime::Error error)
- error - The load error if any error occurred.
void Loadable::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
- loadStatus - An enumeration indicating load status.
Member Function Documentation
Cancels loading if it is in progress; otherwise it does nothing.
Loads data for the object asynchronously.
You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully nothing will happen.
If it has already failed to load, you can call
[pure virtual] Error Loadable::loadError() const
Gets the current loadError.
Returns the error that was encountered during the most recent load operation. Will be empty if the operation succeeded.
[pure virtual] LoadStatus Loadable::loadStatus() const
Gets the current loadStatus.
Returns the current LoadStatus.
Tries to reload when an object has failed to load.
This method should be called judiciously. It should be called when:
- You didn't have network connectivity earlier when it failed and you want to retry now that you have connectivity.
- The server was down earlier when it failed and you want to retry.
- The request is taking too long and you want to cancel it and retry, in which case you will first call
cancelLoad()and then this method.
If the data hasn't started loading, it will start loading. If it is already loading, it will continue to load. If it has already loaded successfully nothing happens. If it has already failed to load, it tries again.