Interface to support querying for shared templates and creating features with shared templates. More...
| Header | #include <Shared |
| Since | Esri |
| Inherited By | Esri |
Public Functions
| virtual | ~ |
| virtual QFuture | add |
| virtual QFuture | create |
| virtual QFuture | create |
| virtual QFuture | query |
Protected Functions
Detailed Description
Member Function Documentation
[protected] SharedTemplateSource::SharedTemplateSource ()
Constructor.
[virtual noexcept] SharedTemplateSource::~SharedTemplateSource ()
Destructor.
[pure virtual] QFuture<void> SharedTemplateSource::addFeaturesAsync (Esri::ArcGISRuntime::SharedTemplateFeatureCreationSet *featureCreationSet )
Adds a set of features created from a shared template to the database.
This method adds features into their respective layer or table in the database, along with their related records and utility associations, all within a single transaction.
If the QFuture result completes without an error, all features and their associations are added successfully. If not, the first error encountered is reported and neither features nor associations are added.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
- featureCreationSet - The features created from a shared template.
[pure virtual] QFuture<Esri::ArcGISRuntime::SharedTemplateFeatureCreationSet *> SharedTemplateSource::createFeaturesAsync (Esri::ArcGISRuntime::SharedTemplate *sharedTemplate , QObject *parent = nullptr)
Creates a set of features based on the specified shared template.
This overload is used when the shared template applies only to non-spatial tables.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
- sharedTemplate - The template that determines the features to create.
- parent - An optional parent.
[pure virtual] QFuture<Esri::ArcGISRuntime::SharedTemplateFeatureCreationSet *> SharedTemplateSource::createFeaturesAsync (Esri::ArcGISRuntime::SharedTemplate *sharedTemplate , const Esri::ArcGISRuntime::Geometry &geometry, QObject *parent = nullptr)
Creates a set of features based on the specified shared template and geometry.
The specified sharedTemplate determines the primary feature and its related set of features joined by:
- FeatureTemplateDefinition::relationships
- PresetTemplateDefinition::presetTemplateFeatures
- GroupTemplateDefinition::parts
- GroupTemplateDefinition::canCreateUtilityAssociations
The input geometry is optional when the shared template is for non-spatial tables only. Use the overload without a geometry argument in that case.
Otherwise, the input geometry is required to create the:
- spatial feature in a FeatureTemplateDefinition
- primary feature in a GroupTemplateDefinition from which the rest of the parts are built
- features in a PresetTemplateDefinition, which are moved around this new origin point geometry
With utility network data, if the shared template defines association creation, both the features and their utility associations are returned in the result.
If the QFuture result completes without an error, all features, along with their related records and utility associations, are created successfully. If not, the first error encountered is reported and neither features nor associations are created.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
- sharedTemplate - The template that determines the features to create.
- geometry - The geometry from which features are created.
- parent - An optional parent.
[pure virtual] QFuture<QMap<qint64, QList<Esri::ArcGISRuntime::SharedTemplate *>>> SharedTemplateSource::querySharedTemplatesAsync (Esri::ArcGISRuntime::SharedTemplateQueryParameters *queryParameters = nullptr, QObject *parent = nullptr)
Queries the database for shared templates. This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
Returns a SharedTemplate collection that matches the SharedTemplateQueryParameters for every ArcGISFeatureTable::serviceLayerId.
Query parameters are optional. When no query parameters are provided and SharedTemplateQuerySourceType::Database is supported, all visible SharedTemplate for each table in the database are returned. Otherwise, a collection of SharedTemplate with FeatureTemplateDefinition based on the FeatureTemplate is returned.
- queryParameters - The optional parameters used to query.
- parent - An optional parent.