LuciadCPillar 2023.1.04
|
A feature creator can create feature instances, based on input events. More...
#include <luciad/create/features/IFeatureCreator.h>
Public Member Functions | |
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... | |
A feature creator can create feature instances, based on input events.
It uses a callback
to signal changes to the feature or to signal that the creation has finished.
Users of this class need to
start
creationsend events
to the creatorfeature changes
finished
IFeatureCreator instances can be used multiple times. Creating a new instance should only start
after the last one has finished
.
|
virtualdefault |
|
pure virtual |
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. |
Implemented in luciad::FeatureCreator, and luciad::MilitarySymbolFeatureCreator.
|
pure virtual |
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. |
Implemented in luciad::FeatureCreator, and luciad::MilitarySymbolFeatureCreator.