LuciadCPillar 2024.0.05
|
A callback interface that can signal that a geometry was changed in the context of creation. More...
#include <luciad/create/geometries/IGeometryCreateCallback.h>
Public Member Functions | |
virtual | ~IGeometryCreateCallback ()=default |
virtual void | onGeometryChanged (const std::shared_ptr< Geometry > &newGeometry, ChangeStatus changeStatus)=0 |
Can be implemented to handle the given geometry. More... | |
virtual void | onGeometryCreateFailed (const ErrorInfo &errorInfo)=0 |
Can be implemented to handle the case when geometry creation has failed. More... | |
Static Public Member Functions | |
static std::shared_ptr< IGeometryCreateCallback > | create (std::function< void(const std::shared_ptr< Geometry > &, ChangeStatus)> onChangedFunction, std::function< void(const ErrorInfo &)> onFailedFunction) |
Creates a default IGeometryCreateCallback instance that delegates the IGeometryCreateCallback::onGeometryChanged to the given function. More... | |
A callback interface that can signal that a geometry was changed in the context of creation.
This class is used by IGeometryCreator
implementations.
|
virtualdefault |
|
static |
Creates a default IGeometryCreateCallback instance that delegates the IGeometryCreateCallback::onGeometryChanged
to the given function.
This is a convenience method that allows to reduce boiler plate code using lambdas.
onChangedFunction | the function that is called by IGeometryCreateCallback::onGeometryChanged |
onFailedFunction | the function that is called by IGeometryCreateCallback::onGeometryCreateFailed |
|
pure virtual |
Can be implemented to handle the given geometry.
newGeometry | the new geometry, cannot be nullptr |
changeStatus | the status of this change |
|
pure virtual |
Can be implemented to handle the case when geometry creation has failed.
errorInfo | an info object that describes why creation failed. |