![]() |
LuciadCPillar 2024.1.06
|
Default handles provider for features. More...
#include <luciad/edit/features/FeatureHandlesProvider.h>
Classes | |
class | IHandleFactory |
Allows you to specify the translate handle that is used by this handles provider. More... | |
Public Member Functions | |
FeatureHandlesProvider () | |
Creates a new instance. More... | |
~FeatureHandlesProvider () override | |
bool | canProvide (const std::shared_ptr< Observable< Feature > > &feature, const std::shared_ptr< FeatureEditContext > &context) const override |
Indicates if this handles provider can create handles for the given Feature. More... | |
std::shared_ptr< IGeometryHandlesProvider > | getGeometryHandlesProvider () const |
Returns the IGeometryHandlesProvider that is used. More... | |
std::shared_ptr< IHandleFactory > | getHandleFactory () const |
Returns the handle factory used by the handles provider. More... | |
std::shared_ptr< IEditHandles > | provide (std::shared_ptr< Observable< Feature > > feature, const std::shared_ptr< FeatureEditContext > &context, std::shared_ptr< IFeatureEditCallback > featureEditCallback) const override |
Returns handles for the given feature. More... | |
void | setGeometryHandlesProvider (std::shared_ptr< IGeometryHandlesProvider > handlesProvider) |
Sets the IGeometryHandlesProvider that is used. More... | |
void | setHandleFactory (std::shared_ptr< IHandleFactory > handleFactory) |
Sets the handle factory used by the handles provider. More... | |
![]() | |
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< IEditHandles > | provide (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... | |
Default handles provider for features.
It can create a handles for features by:
creating
a handle to translate the entire featuredelegating
to a geometry handles provider.The delegate geometry handles are created using an IGeometryHandlesProvider
. The geometry is extracted from the feature using the IFeatureGeometryProvider
that is provided
by the feature layer. This IFeatureGeometryProvider
can be configured
in the feature layer.
luciad::FeatureHandlesProvider::FeatureHandlesProvider | ( | ) |
Creates a new instance.
|
override |
|
overridevirtual |
Indicates if this handles provider can create handles for the given Feature.
feature | an observable Feature. |
context | the context. Contains additional information about the edited feature. |
Implements luciad::IFeatureHandlesProvider.
std::shared_ptr< IGeometryHandlesProvider > luciad::FeatureHandlesProvider::getGeometryHandlesProvider | ( | ) | const |
Returns the IGeometryHandlesProvider
that is used.
IGeometryHandlesProvider
that is used. std::shared_ptr< IHandleFactory > luciad::FeatureHandlesProvider::getHandleFactory | ( | ) | const |
Returns the handle factory used by the handles provider.
|
overridevirtual |
Returns handles for the given feature.
If this provider doesn't support the given feature, it can return nullptr
.
feature | the observable feature for which to create handles. |
context | the context. Contains additional information about the edited feature. |
featureEditCallback | a callback that notifies the caller when the Feature has changed. |
nullptr
. Implements luciad::IFeatureHandlesProvider.
void luciad::FeatureHandlesProvider::setGeometryHandlesProvider | ( | std::shared_ptr< IGeometryHandlesProvider > | handlesProvider | ) |
Sets the IGeometryHandlesProvider
that is used.
If this method is not called, or if nullptr
is passed, a default
implementation is used.
handlesProvider | the IGeometryHandlesProvider to use. Can be nullptr . |
void luciad::FeatureHandlesProvider::setHandleFactory | ( | std::shared_ptr< IHandleFactory > | handleFactory | ) |
Sets the handle factory used by the handles provider.
If this method is not called, a default handle factory is used. You can change the behavior of this default handle factory by:
IHandleFactory
implementation, by delegating to the default factoryhandleFactory | a handle factory |