LuciadCPillar 2023.1.04
luciad::PointCreator Class Referencefinal

This class can create point instances. More...

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

Inheritance diagram for luciad::PointCreator:
luciad::IGeometryCreator

Public Member Functions

 PointCreator (std::shared_ptr< CoordinateReference > reference)
 Creates a new PointCreator. More...
 
 ~PointCreator () override
 
std::shared_ptr< IPointConstraintgetConstraint () const
 
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 setConstraint (std::shared_ptr< IPointConstraint > constraint)
 Sets the constraint to use during creation. More...
 
void start (std::shared_ptr< IGeometryCreateCallback > callback, const std::shared_ptr< FeatureCreateContext > &context) override
 This method is called to start creation. More...
 
- Public Member Functions inherited from luciad::IGeometryCreator
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

This class can create point instances.

It reacts on

This class does not allow you to interactively choose the elevation of the point. The elevation will by default be set to 0.

Since
2020.1

Constructor & Destructor Documentation

◆ PointCreator()

luciad::PointCreator::PointCreator ( std::shared_ptr< CoordinateReference reference)
explicit

Creates a new PointCreator.

Parameters
referencethe reference of the created point

◆ ~PointCreator()

luciad::PointCreator::~PointCreator ( )
override

Member Function Documentation

◆ getConstraint()

std::shared_ptr< IPointConstraint > luciad::PointCreator::getConstraint ( ) const
Returns
the constraint that is used during creation. Can be nullptr.
See also
setConstraint

◆ onEvent()

EventResult luciad::PointCreator::onEvent ( const std::shared_ptr< IInputEvent > &  inputEvent,
const std::shared_ptr< FeatureCreateContext > &  context 
)
overridevirtual

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.

Implements luciad::IGeometryCreator.

◆ setConstraint()

void luciad::PointCreator::setConstraint ( std::shared_ptr< IPointConstraint constraint)

Sets the constraint to use during creation.

The default is no constraint.

Parameters
constraintthe constraint. Can be nullptr.

◆ start()

void luciad::PointCreator::start ( std::shared_ptr< IGeometryCreateCallback callback,
const std::shared_ptr< FeatureCreateContext > &  context 
)
overridevirtual

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.

Implements luciad::IGeometryCreator.