Skip To Content ArcGIS for Developers Sign In Dashboard

Loadable Class

(Esri::ArcGISRuntime::Loadable)

Marker interface inherited by classes that can load data asynchronously. More...

Header: #include <Loadable>
Since: Esri::ArcGISRuntime 100.0
Inherited By:

Esri::ArcGISRuntime::ArcGISFeature, Esri::ArcGISRuntime::ArcGISSublayer, Esri::ArcGISRuntime::Basemap, Esri::ArcGISRuntime::ClosestFacilityTask, Esri::ArcGISRuntime::ElevationSource, Esri::ArcGISRuntime::EncCell, Esri::ArcGISRuntime::EncExchangeSet, Esri::ArcGISRuntime::ExportTileCacheTask, Esri::ArcGISRuntime::ExportVectorTilesTask, Esri::ArcGISRuntime::FeatureCollection, Esri::ArcGISRuntime::FeatureTable, Esri::ArcGISRuntime::Geodatabase, Esri::ArcGISRuntime::GeodatabaseSyncTask, Esri::ArcGISRuntime::GeoPackage, Esri::ArcGISRuntime::GeoprocessingTask, Esri::ArcGISRuntime::ItemResourceCache, Esri::ArcGISRuntime::KmlDataset, Esri::ArcGISRuntime::Layer, Esri::ArcGISRuntime::LocatorTask, Esri::ArcGISRuntime::Map, Esri::ArcGISRuntime::MobileMapPackage, Esri::ArcGISRuntime::MobileScenePackage, Esri::ArcGISRuntime::ModelSceneSymbol, Esri::ArcGISRuntime::OfflineMapSyncTask, Esri::ArcGISRuntime::OfflineMapTask, Esri::ArcGISRuntime::PictureFillSymbol, Esri::ArcGISRuntime::PictureFillSymbolLayer, Esri::ArcGISRuntime::PictureMarkerSymbol, Esri::ArcGISRuntime::PictureMarkerSymbolLayer, Esri::ArcGISRuntime::PopupAttachment, Esri::ArcGISRuntime::Portal, Esri::ArcGISRuntime::PortalItem, Esri::ArcGISRuntime::PortalUser, Esri::ArcGISRuntime::PreplannedMapArea, Esri::ArcGISRuntime::Raster, Esri::ArcGISRuntime::RouteTask, Esri::ArcGISRuntime::Scene, Esri::ArcGISRuntime::ServiceAreaTask, Esri::ArcGISRuntime::Surface, Esri::ArcGISRuntime::SymbolStyle, Esri::ArcGISRuntime::TileCache, Esri::ArcGISRuntime::UtilityNetwork, Esri::ArcGISRuntime::VectorTileCache, Esri::ArcGISRuntime::WfsService, Esri::ArcGISRuntime::WmsService, and Esri::ArcGISRuntime::WmtsService

Public Functions

virtual ~Loadable()
virtual void cancelLoad() = 0
virtual void load() = 0
virtual Error loadError() const = 0
virtual LoadStatus loadStatus() const = 0
virtual void retryLoad() = 0

Protected Functions

Detailed Description

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.

See also loadError() and loadStatus().

Member Function Documentation

[protected] Loadable::Loadable()

Constructor.

[virtual] Loadable::~Loadable()

Destructor.

[pure virtual] void Loadable::cancelLoad()

Cancels loading if it is in progress; otherwise it does nothing.

[pure virtual] void Loadable::load()

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 retryLoad().

[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.

[pure virtual] void Loadable::retryLoad()

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.


Feedback on this topic?