LuciadCPillar 2023.1.04
luciad::IGeometryEditCallback Class Referenceabstract

A callback interface that can signal that a geometry was edited. More...

#include <luciad/edit/geometries/IGeometryEditCallback.h>

Public Member Functions

virtual ~IGeometryEditCallback ()=default
 
virtual void onEdit (const std::shared_ptr< Geometry > &newGeometry, ChangeStatus changeStatus)=0
 Can be implemented to handle the given geometry. More...
 

Static Public Member Functions

static std::shared_ptr< IGeometryEditCallbackcreate (std::function< void(const std::shared_ptr< Geometry > &, ChangeStatus)> function)
 Creates a default IGeometryEditCallback instance that delegates the IGeometryEditCallback::onEdit to the given function. More...
 

Detailed Description

A callback interface that can signal that a geometry was edited.

This class is used by IEditHandles implementations to signal that they made changes to the geometry. See also IGeometryHandlesProvider.

Since
2020.1

Constructor & Destructor Documentation

◆ ~IGeometryEditCallback()

virtual luciad::IGeometryEditCallback::~IGeometryEditCallback ( )
virtualdefault

Member Function Documentation

◆ create()

static std::shared_ptr< IGeometryEditCallback > luciad::IGeometryEditCallback::create ( std::function< void(const std::shared_ptr< Geometry > &, ChangeStatus)>  function)
static

Creates a default IGeometryEditCallback instance that delegates the IGeometryEditCallback::onEdit to the given function.

This is a convenience method that allows you to reduce boiler plate code using lambdas.

Parameters
functionthe function that is called by IGeometryEditCallback::onEdit
Returns
an IGeometryEditCallback instance based on the given function.

◆ onEdit()

virtual void luciad::IGeometryEditCallback::onEdit ( const std::shared_ptr< Geometry > &  newGeometry,
ChangeStatus  changeStatus 
)
pure virtual

Can be implemented to handle the given geometry.

Parameters
newGeometrythe new geometry, cannot be nullptr
changeStatusthe status of the change