LuciadCPillar 2024.1.09
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
 Returns the default edit settings. More...
 
virtual std::shared_ptr< Observable< Feature > > getFeature () const =0
 Returns the Feature that is being edited. More...
 
virtual LayerFeatureId getHandleFeatureId () const =0
 Returns the feature ID for the handle to which this context is passed. More...
 
virtual LayerId getHandleLayerId () const =0
 Returns the layer ID of the handle of the Feature that is being edited. More...
 
virtual std::shared_ptr< FeatureLayergetLayer () const =0
 Returns the FeatureLayer on which the feature is edited. More...
 
virtual std::shared_ptr< MapgetMap () const =0
 Returns the map on which the feature is being edited. More...
 
virtual const std::shared_ptr< IFeatureModel > & getModel () const =0
 Returns the IFeatureModel of the Feature that is being edited. More...
 
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.

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.

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.

Returns
the feature ID for the handle to which this context is passed.

◆ getHandleLayerId()

virtual LayerId luciad::FeatureEditContext::getHandleLayerId ( ) const
pure virtual

Returns the layer ID of the handle of the Feature that is being edited.

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.

Returns
the FeatureLayer on which the feature is edited.
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.

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.

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.