LuciadCPillar 2023.1.03
luciad::FeatureEditContext Class Referenceabstract

FeatureEditContext provides context information for the feature that is being edited. More...

#include <luciad/edit/features/FeatureEditContext.h>

Public Member Functions

virtual ~FeatureEditContext ()=default
 
virtual std::shared_ptr< EditSettingsgetDefaultSettings () const =0
 
virtual std::shared_ptr< Observable< Feature > > getFeature () const =0
 
virtual LayerFeatureId getHandleFeatureId () const =0
 
virtual LayerId getHandleLayerId () const =0
 
virtual std::shared_ptr< FeatureLayergetLayer () const =0
 
virtual std::shared_ptr< MapgetMap () const =0
 
virtual const std::shared_ptr< IFeatureModel > & getModel () const =0
 
virtual LayerFeatureId getPreviewFeatureId () const =0
 Returns the ID for the Feature that is used to visualize the editing result. More...
 

Detailed Description

FeatureEditContext provides context information for the feature that is being edited.

Since
2020.1

Constructor & Destructor Documentation

◆ ~FeatureEditContext()

virtual luciad::FeatureEditContext::~FeatureEditContext ( )
virtualdefault

Member Function Documentation

◆ getDefaultSettings()

virtual std::shared_ptr< EditSettings > luciad::FeatureEditContext::getDefaultSettings ( ) const
pure virtual
Returns
the default edit settings

◆ getFeature()

virtual std::shared_ptr< Observable< Feature > > luciad::FeatureEditContext::getFeature ( ) const
pure virtual
Returns
the Feature that is being edited.

◆ getHandleFeatureId()

virtual LayerFeatureId luciad::FeatureEditContext::getHandleFeatureId ( ) const
pure virtual
Returns
the feature ID for the handle to which this context is passed. It can be used to query the map for specific edit handles, for example. This method will throw an exception if it is called outside an IEditHandle call.

◆ getHandleLayerId()

virtual LayerId luciad::FeatureEditContext::getHandleLayerId ( ) const
pure virtual
Returns
the layer ID of the handle of the Feature that is being edited.

◆ getLayer()

virtual std::shared_ptr< FeatureLayer > luciad::FeatureEditContext::getLayer ( ) const
pure virtual
Returns
the FeatureLayer on which the feature is edited. The layer can for example be used to retrieve the IFeatureGeometryProvider.
See also
FeatureLayer::getEditCreateGeometryProvider

◆ getMap()

virtual std::shared_ptr< Map > luciad::FeatureEditContext::getMap ( ) const
pure virtual
Returns
the map on which the feature is being edited.

◆ getModel()

virtual const std::shared_ptr< IFeatureModel > & luciad::FeatureEditContext::getModel ( ) const
pure virtual
Returns
the IFeatureModel of the Feature that is being edited.

◆ getPreviewFeatureId()

virtual LayerFeatureId luciad::FeatureEditContext::getPreviewFeatureId ( ) const
pure virtual

Returns the ID for the Feature that is used to visualize the editing result.

Depending on the configured ModelUpdateMode, this can be a different ID.

For ModelUpdateMode::OnAnyChange, the original layer is used and the id of getFeature().

For ModelUpdateMode::OnMajorChanges and ModelUpdateMode::OnEditFinished, this is the ID of the a copy of the Feature, visualized by the handle layer.

This ID can be used for the Map::queryFeatures method to detect if the currently edited Feature is touched, for example.

Returns
the ID for the Feature that is being edited.