LuciadCPillar 2023.1.04
|
This class can create feature instances, based on a geometry. More...
#include <luciad/create/features/FeatureCreator.h>
Public Member Functions | |
FeatureCreator (Feature initialFeature, std::shared_ptr< IGeometryCreator > geometryCreator) | |
Creates a new FeatureCreator. More... | |
~FeatureCreator () override | |
EventResult | onEvent (const std::shared_ptr< IInputEvent > &inputEvent, const std::shared_ptr< FeatureCreateContext > &context) override |
Handles the given event, and returns if the event was handled or not. More... | |
void | start (std::shared_ptr< IFeatureCreateCallback > callback, const std::shared_ptr< FeatureCreateContext > &context) override |
This method is called to start creation. More... | |
Public Member Functions inherited from luciad::IFeatureCreator | |
virtual | ~IFeatureCreator ()=default |
virtual EventResult | onEvent (const std::shared_ptr< IInputEvent > &inputEvent, const std::shared_ptr< FeatureCreateContext > &context)=0 |
Handles the given event, and returns if the event was handled or not. More... | |
virtual void | start (std::shared_ptr< IFeatureCreateCallback > callback, const std::shared_ptr< FeatureCreateContext > &context)=0 |
This method is called to start creation. More... | |
This class can create feature instances, based on a geometry.
This creator will
create a geometry
on the mapfill in
the remaining Feature values using the created geometryThis initial Feature must contain the following:
assign the id
to newly added
features. In this case, the Feature must not contain an id. Other models however, allow newly added features to already have an id. In that case, this Feature must have an id.apply a geometry
on a FeatureThis creator doesn't consume any events itself, but it delegates the events to the wrapped geometry creator instance.
luciad::FeatureCreator::FeatureCreator | ( | Feature | initialFeature, |
std::shared_ptr< IGeometryCreator > | geometryCreator | ||
) |
Creates a new FeatureCreator.
initialFeature | the initial feature |
geometryCreator | the delegate geometry creator to use, cannot be nullptr . |
NullArgumentException | when the geometry creator is nullptr . |
|
override |
|
overridevirtual |
Handles the given event, and returns if the event was handled or not.
context | the creation context, cannot be nullptr |
inputEvent | an event, cannot be nullptr |
NullArgumentException | when nullptr is passed. |
Implements luciad::IFeatureCreator.
|
overridevirtual |
This method is called to start creation.
After this call, IFeatureCreator::onEvent
can be called.
When a IFeatureCreator was started, it can not be started again until it has stopped
. Implementations of this method are encouraged to throw an exception in that case to signal a programming error by the caller of this method.
context | the creation context, cannot be nullptr |
callback | the callback to signal feature changes, and whether creation for the feature has finished, cannot be nullptr . |
NullArgumentException | when nullptr is passed. |
Implements luciad::IFeatureCreator.