LuciadCPillar C# 2023.1.04
Luciad.Models.Features.IFeatureSaveSupport Interface Reference

An implementation of this interface can be supplied to the FeatureModelPersistenceManager to enable support for saving in-memory changes. More...

Public Member Functions

void DiscardChanges ()
 Resets the unsaved (in-memory) changes of the IFeatureModel, returning the IFeatureModel's state back to that of its backend. More...
 
System.Collections.Generic.IList< Luciad.Models.Features.FeatureChangeGetChanges ()
 Retrieves a list of all unsaved (in-memory) changes to the IFeatureModel. More...
 
Luciad.Models.Features.FeatureSaveErrorInfo SaveChanges ()
 Saves the in-memory changes of the IFeatureModel in the IFeatureModel's backend (for example a file or database). More...
 

Detailed Description

An implementation of this interface can be supplied to the FeatureModelPersistenceManager to enable support for saving in-memory changes.

See this article for more information. 2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IFeatureSaveSupport.

Member Function Documentation

◆ DiscardChanges()

void Luciad.Models.Features.IFeatureSaveSupport.DiscardChanges ( )

Resets the unsaved (in-memory) changes of the IFeatureModel, returning the IFeatureModel's state back to that of its backend.

Since this changes the in-memory state of the IFeatureModel, the model's observers should be notified with a luciad::FeatureModelEvent containing feature changes that go from the current state to the backend's state.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IFeatureSaveSupport::discardChanges.

◆ GetChanges()

System.Collections.Generic.IList< Luciad.Models.Features.FeatureChange > Luciad.Models.Features.IFeatureSaveSupport.GetChanges ( )

Retrieves a list of all unsaved (in-memory) changes to the IFeatureModel.

That is, the changes that need to be saved to the IFeatureModel's backend to persist all in-memory changes. There should only be one FeatureChange per FeatureId. If a feature has been updated multiple times, it should be condensed into a single FeatureChange. Note: If a feature has been deleted, and another feature with the same FeatureId was added, this condenses to a single update FeatureChange. a list of all uncommitted changes to the IFeatureModel

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IFeatureSaveSupport::getChanges.

◆ SaveChanges()

Luciad.Models.Features.FeatureSaveErrorInfo Luciad.Models.Features.IFeatureSaveSupport.SaveChanges ( )

Saves the in-memory changes of the IFeatureModel in the IFeatureModel's backend (for example a file or database).

Typically, this method shouldn't modify the in-memory state of the model. So the feature model does not have to send out events through its observers. In some cases however (depending on the model/save implementation), feature changes can occur while changes are saved. In that case, the model's observers need to be notified of those changes. std::nullopt on success, or error information on failure.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IFeatureSaveSupport::saveChanges.