LuciadCPillar 2023.1.04
luciad::IFeatureCreateCallback Class Referenceabstract

A callback interface that can signal that a feature was changed in the context of creation. More...

#include <luciad/create/features/IFeatureCreateCallback.h>

Public Member Functions

virtual ~IFeatureCreateCallback ()=default
 
virtual void onFeatureChanged (const Feature &newFeature, ChangeStatus changeStatus)=0
 Can be implemented to handle the given feature. More...
 
virtual void onFeatureCreateFailed (const ErrorInfo &errorInfo)=0
 Can be implemented to handle the case when feature creation has failed. More...
 

Static Public Member Functions

static std::shared_ptr< IFeatureCreateCallbackcreate (std::function< void(const Feature &, ChangeStatus)> onChangedFunction, std::function< void(const ErrorInfo &)> onFailedFunction)
 Creates a default IFeatureCreateCallback instance that delegates the IFeatureCreateCallback::onFeatureChanged to the given function. More...
 

Detailed Description

A callback interface that can signal that a feature was changed in the context of creation.

This class is used by IFeatureCreator implementations.

Since
2020.1

Constructor & Destructor Documentation

◆ ~IFeatureCreateCallback()

virtual luciad::IFeatureCreateCallback::~IFeatureCreateCallback ( )
virtualdefault

Member Function Documentation

◆ create()

static std::shared_ptr< IFeatureCreateCallback > luciad::IFeatureCreateCallback::create ( std::function< void(const Feature &, ChangeStatus)>  onChangedFunction,
std::function< void(const ErrorInfo &)>  onFailedFunction 
)
static

Creates a default IFeatureCreateCallback instance that delegates the IFeatureCreateCallback::onFeatureChanged to the given function.

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

Parameters
onChangedFunctionthe function that is called by IFeatureCreateCallback::onFeatureChanged
onFailedFunctionthe function that is called by IFeatureCreateCallback::onFeatureCreateFailed
Returns
an IFeatureCreateCallback instance based on the given function.

◆ onFeatureChanged()

virtual void luciad::IFeatureCreateCallback::onFeatureChanged ( const Feature newFeature,
ChangeStatus  changeStatus 
)
pure virtual

Can be implemented to handle the given feature.

Parameters
newFeaturethe new feature
changeStatusthe status of this change

◆ onFeatureCreateFailed()

virtual void luciad::IFeatureCreateCallback::onFeatureCreateFailed ( const ErrorInfo errorInfo)
pure virtual

Can be implemented to handle the case when feature creation has failed.

Parameters
errorInfoan info object that describes why creation failed