LuciadCPillar 2023.1.04
luciad::IFeatureEditCallback Class Referenceabstract

A callback interface that can signal that a Feature was edited. More...

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

Public Member Functions

virtual ~IFeatureEditCallback ()=default
 
virtual void onEdit (const Feature &newFeature, ChangeStatus changeStatus)=0
 Can be implemented to handle the given Feature. More...
 

Static Public Member Functions

static std::shared_ptr< IFeatureEditCallbackcreate (std::function< void(const Feature &, ChangeStatus)> function)
 Creates a default IFeatureEditCallback instance that delegates the IFeatureEditCallback::onEdit to the given function. More...
 

Detailed Description

A callback interface that can signal that a Feature was edited.

This class is used by IEditHandles implementations to signal changes.

Since
2020.1

Constructor & Destructor Documentation

◆ ~IFeatureEditCallback()

virtual luciad::IFeatureEditCallback::~IFeatureEditCallback ( )
virtualdefault

Member Function Documentation

◆ create()

static std::shared_ptr< IFeatureEditCallback > luciad::IFeatureEditCallback::create ( std::function< void(const Feature &, ChangeStatus)>  function)
static

Creates a default IFeatureEditCallback instance that delegates the IFeatureEditCallback::onEdit to the given function.

This is a convenience method that allows you to reduce boiler plate code using lambdas.

Parameters
functionthe function that is called by IFeatureEditCallback::onEdit
Returns
an IFeatureEditCallback instance based on the given function.

◆ onEdit()

virtual void luciad::IFeatureEditCallback::onEdit ( const Feature newFeature,
ChangeStatus  changeStatus 
)
pure virtual

Can be implemented to handle the given Feature.

Parameters
newFeaturethe new Feature
changeStatusthe edit status