LuciadCPillar 2023.1.04
luciad::Editor::Builder Class Referencefinal

Builder for the Editor class. More...

#include <luciad/edit/Editor.h>

Public Member Functions

 Builder (Builder &&other) noexcept
 
 Builder (const Builder &other)
 
 ~Builder ()
 
std::shared_ptr< Editorbuild () const
 Returns a new editor, based on the properties set on this builder. More...
 
BuilderdefaultSettings (std::shared_ptr< EditSettings > editSettings)
 Sets the default settings that can be used by the handles that are used to edit features and geometries. More...
 
BuildereditCandidateProvider (std::shared_ptr< IFeatureEditCandidateProvider > editCandidateProvider)
 Sets the IFeatureEditCandidateProvider to use. More...
 
Buildermap (std::shared_ptr< Map > map)
 Sets the map on which features are edited. More...
 
BuildermouseCursorCallback (std::shared_ptr< IMouseCursorCallback > mouseCursorCallback)
 Sets the IMouseCursorCallback to use. More...
 
Builderoperator= (Builder other) noexcept
 

Detailed Description

Builder for the Editor class.

Since
2020.1

Constructor & Destructor Documentation

◆ Builder() [1/2]

luciad::Editor::Builder::Builder ( const Builder other)

◆ Builder() [2/2]

luciad::Editor::Builder::Builder ( Builder &&  other)
noexcept

◆ ~Builder()

luciad::Editor::Builder::~Builder ( )

Member Function Documentation

◆ build()

std::shared_ptr< Editor > luciad::Editor::Builder::build ( ) const

Returns a new editor, based on the properties set on this builder.

Returns
a new editor.
Exceptions
luciad::LogicExceptionif not all mandatory parameters are set

◆ defaultSettings()

Builder & luciad::Editor::Builder::defaultSettings ( std::shared_ptr< EditSettings editSettings)

Sets the default settings that can be used by the handles that are used to edit features and geometries.

Feature and Geometry implementations are encouraged to use these default settings. The settings are available in the context given as parameter to their methods.

This parameter is optional. If it is not provided, a default EditSettings instance will be used.

Parameters
editSettingsthe default settings to use. Should not be nullptr.
Returns
this builder
Exceptions
NullArgumentExceptionwhen nullptr is passed.

◆ editCandidateProvider()

Builder & luciad::Editor::Builder::editCandidateProvider ( std::shared_ptr< IFeatureEditCandidateProvider editCandidateProvider)

Sets the IFeatureEditCandidateProvider to use.

This parameter is optional. When it is not set, edit candidates will be based on selection through FeatureStateEditCandidateProvider.

Parameters
editCandidateProviderthe edit candidate provider to use.
Returns
this builder
Exceptions
NullArgumentExceptionwhen nullptr is passed.

◆ map()

Builder & luciad::Editor::Builder::map ( std::shared_ptr< Map map)

Sets the map on which features are edited.

This parameter is mandatory. If it is not set, Editor::Builder::build will throw an exception.

Parameters
mapthe Map on which to edit features
Returns
this builder
Exceptions
NullArgumentExceptionwhen nullptr is passed.

◆ mouseCursorCallback()

Builder & luciad::Editor::Builder::mouseCursorCallback ( std::shared_ptr< IMouseCursorCallback mouseCursorCallback)

Sets the IMouseCursorCallback to use.

This callback is called when the Editor's cursor has changed.

Typically, this method is called by an IController implementation that supports Feature editing. This implementation can call Map::setCursor to effectively change the mouse cursor.

This callback is called on the UI thread only.

This parameter is optional.

Parameters
mouseCursorCallbacka callback that is called when the editor's cursor has changed.
Returns
this builder

◆ operator=()

Builder & luciad::Editor::Builder::operator= ( Builder  other)
noexcept