LuciadCPillar 2024.0.08
luciad::IGeometryCreator Class Referenceabstract

A geometry creator can create geometry instances, based on input events. More...

#include <luciad/create/geometries/IGeometryCreator.h>

Inheritance diagram for luciad::IGeometryCreator:
luciad::PatchCreator luciad::PointCreator luciad::PolylineCreator luciad::PolylineRingCreator

Public Member Functions

virtual ~IGeometryCreator ()=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< IGeometryCreateCallback > callback, const std::shared_ptr< FeatureCreateContext > &context)=0
 This method is called to start creation. More...
 

Detailed Description

A geometry creator can create geometry instances, based on input events.

It uses a callback to signal changes to the geometry or to signal that the creation has finished.

Users of this class need to

IGeometryCreator instances can be used multiple times. Creating a new instance should only start after the last one has finished.

Since
2020.1

Constructor & Destructor Documentation

◆ ~IGeometryCreator()

virtual luciad::IGeometryCreator::~IGeometryCreator ( )
virtualdefault

Member Function Documentation

◆ onEvent()

virtual EventResult luciad::IGeometryCreator::onEvent ( const std::shared_ptr< IInputEvent > &  inputEvent,
const std::shared_ptr< FeatureCreateContext > &  context 
)
pure virtual

Handles the given event, and returns if the event was handled or not.

Parameters
contextthe context, cannot be nullptr
inputEventan event, cannot be nullptr
Returns
if the event was consumed or not
Exceptions
NullArgumentExceptionwhen nullptr is passed.

Implemented in luciad::PatchCreator, luciad::PointCreator, luciad::PolylineCreator, and luciad::PolylineRingCreator.

◆ start()

virtual void luciad::IGeometryCreator::start ( std::shared_ptr< IGeometryCreateCallback callback,
const std::shared_ptr< FeatureCreateContext > &  context 
)
pure virtual

This method is called to start creation.

After this call, IGeometryCreator::onEvent can be called.

When a IGeometryCreator was started, it can not be started again until it has finished. Implementations of this method are encouraged to throw an exception in that case to signal a programming error by the caller of this method.

Parameters
contextthe context, cannot be nullptr
callbackthe callback to signal geometry changes, and whether creation for the geometry has finished, cannot be nullptr.
Exceptions
NullArgumentExceptionwhen nullptr is passed.

Implemented in luciad::PatchCreator, luciad::PointCreator, luciad::PolylineCreator, and luciad::PolylineRingCreator.