LuciadCPillar 2024.0.08
|
This class allows you to interactively create Features on the Map. More...
#include <luciad/create/Creator.h>
Classes | |
class | Builder |
Builder for the Creator class. More... | |
Public Member Functions | |
~Creator () | |
void | addObserver (std::shared_ptr< ICreatorObserver > observer) |
Adds an observer that is called when a Feature was created and added to the model, or when feature creation failed. More... | |
std::shared_ptr< FeatureLayer > | getPreviewLayer () const |
Returns the layer that can paint a preview of the Feature that is being created. More... | |
EventResult | onEvent (const std::shared_ptr< IInputEvent > &inputEvent) |
Handles the given event, and returns if the event was handled or not. More... | |
void | removeObserver (const std::shared_ptr< ICreatorObserver > &observer) |
Removes the given observer. More... | |
Static Public Member Functions | |
static Builder | newBuilder () |
Returns a new builder for creating a Creator . More... | |
This class allows you to interactively create Features on the Map.
A Creator should only be used once, i.e. to create a single Feature. Afterwards, it can be discarded.
luciad::Creator::~Creator | ( | ) |
void luciad::Creator::addObserver | ( | std::shared_ptr< ICreatorObserver > | observer | ) |
Adds an observer that is called when a Feature was created and added to the model, or when feature creation failed.
observer | an observer |
luciad::InvalidArgumentException | when the observer was already added. |
luciad::NullArgumentException | when the observer is nullptr . |
std::shared_ptr< FeatureLayer > luciad::Creator::getPreviewLayer | ( | ) | const |
|
static |
EventResult luciad::Creator::onEvent | ( | const std::shared_ptr< IInputEvent > & | inputEvent | ) |
Handles the given event, and returns if the event was handled or not.
inputEvent | an event, cannot be nullptr . |
NullArgumentException | when the input event is nullptr . |
void luciad::Creator::removeObserver | ( | const std::shared_ptr< ICreatorObserver > & | observer | ) |
Removes the given observer.
If the given callback was never added, an exception is thrown.
observer | an observer. |
luciad::InvalidArgumentException | when the observer is not known. |
luciad::NullArgumentException | when the observer is nullptr . |