Loadable Class

  • Loadable
  • class Esri::ArcGISRuntime::Loadable

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

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

    Esri::ArcGISRuntime::ArcadeEvaluator, Esri::ArcGISRuntime::ArcGISFeature, Esri::ArcGISRuntime::ArcGISSublayer, Esri::ArcGISRuntime::Basemap, Esri::ArcGISRuntime::ClosestFacilityTask, Esri::ArcGISRuntime::ContingentValuesDefinition, Esri::ArcGISRuntime::ElevationSource, Esri::ArcGISRuntime::EncCell, Esri::ArcGISRuntime::EncExchangeSet, Esri::ArcGISRuntime::ExportTileCacheTask, Esri::ArcGISRuntime::ExportVectorTilesTask, Esri::ArcGISRuntime::FeatureCollection, Esri::ArcGISRuntime::FeatureTable, Esri::ArcGISRuntime::FloorManager, Esri::ArcGISRuntime::Geodatabase, Esri::ArcGISRuntime::GeodatabaseSyncTask, Esri::ArcGISRuntime::GeoModel, Esri::ArcGISRuntime::GeoPackage, Esri::ArcGISRuntime::GeoprocessingTask, Esri::ArcGISRuntime::GeotriggersInfo, Esri::ArcGISRuntime::ImageFrame, Esri::ArcGISRuntime::ItemResourceCache, Esri::ArcGISRuntime::KmlDataset, Esri::ArcGISRuntime::Layer, Esri::ArcGISRuntime::LocatorTask, Esri::ArcGISRuntime::MobileMapPackage, Esri::ArcGISRuntime::MobileScenePackage, Esri::ArcGISRuntime::ModelSceneSymbol, Esri::ArcGISRuntime::OfflineMapSyncTask, Esri::ArcGISRuntime::OfflineMapTask, Esri::ArcGISRuntime::OgcFeatureService, Esri::ArcGISRuntime::PictureFillSymbol, Esri::ArcGISRuntime::PictureFillSymbolLayer, Esri::ArcGISRuntime::PictureMarkerSymbol, Esri::ArcGISRuntime::PictureMarkerSymbolLayer, Esri::ArcGISRuntime::PopupAttachment, Esri::ArcGISRuntime::Portal, Esri::ArcGISRuntime::PortalGroup, Esri::ArcGISRuntime::PortalItem, Esri::ArcGISRuntime::PortalUser, Esri::ArcGISRuntime::PreplannedMapArea, Esri::ArcGISRuntime::Raster, Esri::ArcGISRuntime::RouteTask, Esri::ArcGISRuntime::ServiceAreaTask, Esri::ArcGISRuntime::ServiceGeodatabase, 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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    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

    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.

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