Marker interface inherited by classes that can load metadata asynchronously. More...
Public Functions
virtual | ~Loadable() |
virtual void | cancelLoad() = 0 |
virtual void | load() = 0 |
virtual Esri::ArcGISRuntime::Error | loadError() const = 0 |
virtual Esri::ArcGISRuntime::LoadStatus | loadStatus() const = 0 |
virtual void | retryLoad() = 0 |
Protected Functions
Loadable() |
Detailed Description
A pure virtual interface implemented by classes whose objects can load metadata asynchronously, for example, from a remote network location or the local file system. A resource that is capable of loading its metadata asynchronously is referred to as a loadable. Such a resource could represent a remote service or a dataset on disk. 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.
See also loadError() and loadStatus().
Member Function Documentation
[protected]
Loadable::Loadable()
Constructor.
[virtual]
Loadable::~Loadable()
Destructor.
[pure virtual]
void Loadable::cancelLoad ()
Cancels loading the metadata if the object is loading. The loadStatus() property reflects the status of the load operation.
[pure virtual]
void Loadable::load()
Loads metadata for the object asynchronously.
You can call this method any number of times, however only one attempt is made to load the metadata. Loads the metadata if the object is not loaded. 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 retryLoad()
. The loadStatus() property reflects the status of the load operation.
[pure virtual]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::LoadStatus Loadable::loadStatus () const
Gets the current loadStatus.
Returns the current LoadStatus.
[pure virtual]
void Loadable::retryLoad ()
Loads or retries loading metadata for the object asynchronously.
Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded.
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.