LuciadCPillar 2023.1.04
luciad::IFeatureHandlesProvider Class Referenceabstract

This class can provide edit handles for a given Feature. More...

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

Inheritance diagram for luciad::IFeatureHandlesProvider:
luciad::CompositeFeatureHandlesProvider luciad::FeatureHandlesProvider luciad::MilitarySymbolFeatureHandlesProvider

Public Member Functions

virtual ~IFeatureHandlesProvider ()=default
 
virtual bool canProvide (const std::shared_ptr< Observable< Feature > > &feature, const std::shared_ptr< FeatureEditContext > &context) const =0
 Indicates if this handles provider can create handles for the given Feature. More...
 
virtual std::shared_ptr< IEditHandlesprovide (std::shared_ptr< Observable< Feature > > feature, const std::shared_ptr< FeatureEditContext > &context, std::shared_ptr< IFeatureEditCallback > featureEditCallback) const =0
 Returns handles for the given feature. More...
 

Detailed Description

This class can provide edit handles for a given Feature.

The given Feature is passed to this provider as an Observable. This object allows Editor to communicate feature changes to the IEditHandles implementations, who can use it to create and update their collection of handles. Editing changes originating from IEditHandles are communicated to the Editor using IFeatureEditCallback. See also the related guide on editing interactions.

See the related guide for an overview of the editing API.

In many cases, the FeatureHandlesProvider implementation is sufficient.

Since
2020.1

Constructor & Destructor Documentation

◆ ~IFeatureHandlesProvider()

virtual luciad::IFeatureHandlesProvider::~IFeatureHandlesProvider ( )
virtualdefault

Member Function Documentation

◆ canProvide()

virtual bool luciad::IFeatureHandlesProvider::canProvide ( const std::shared_ptr< Observable< Feature > > &  feature,
const std::shared_ptr< FeatureEditContext > &  context 
) const
pure virtual

Indicates if this handles provider can create handles for the given Feature.

Parameters
featurean observable Feature.
contextthe context. Contains additional information about the edited feature.
Returns
if this handles provider can create handles for the given Feature.

Implemented in luciad::CompositeFeatureHandlesProvider, luciad::FeatureHandlesProvider, and luciad::MilitarySymbolFeatureHandlesProvider.

◆ provide()

virtual std::shared_ptr< IEditHandles > luciad::IFeatureHandlesProvider::provide ( std::shared_ptr< Observable< Feature > >  feature,
const std::shared_ptr< FeatureEditContext > &  context,
std::shared_ptr< IFeatureEditCallback featureEditCallback 
) const
pure virtual

Returns handles for the given feature.

If this provider doesn't support the given feature, it can return nullptr.

Parameters
featurethe observable feature for which to create handles.
contextthe context. Contains additional information about the edited feature.
featureEditCallbacka callback that notifies the caller when the Feature has changed.
Returns
handles for the given feature. If this provider doesn't support the given feature, it can return nullptr.

Implemented in luciad::CompositeFeatureHandlesProvider, luciad::FeatureHandlesProvider, and luciad::MilitarySymbolFeatureHandlesProvider.