LuciadCPillar 2023.1.04
|
Helps the creation of a IFeatureModel given a list of features, a model metadata, a feature model metadata and optionally a bounds. More...
#include <luciad/models/features/FeatureModelBuilder.h>
Public Member Functions | |
FeatureModelBuilder (const FeatureModelBuilder &other) | |
FeatureModelBuilder (FeatureModelBuilder &&other) noexcept | |
~FeatureModelBuilder () | |
FeatureModelBuilder & | bounds (std::shared_ptr< Bounds > bounds) |
Sets the bounds of the feature model. More... | |
std::shared_ptr< IFeatureModel > | build () |
Creates a new in-memory IFeatureModel instance, based on the given model metadata, feature model metadata and the list of features. More... | |
FeatureModelBuilder & | editable (bool editable) |
Sets whether the model should be editable or not. More... | |
FeatureModelBuilder & | featureModelMetadata (FeatureModelMetadata featureModelMetadata) |
Sets the FeatureModelMetadata of the feature model. More... | |
FeatureModelBuilder & | features (std::vector< Feature > features) |
Sets the features of the feature model. More... | |
FeatureModelBuilder & | modelMetadata (ModelMetadata modelMetadata) |
Sets the ModelMetadata of the feature model. More... | |
FeatureModelBuilder & | operator= (FeatureModelBuilder other) noexcept |
Static Public Member Functions | |
static FeatureModelBuilder | newBuilder () |
Returns the builder class for creation of the IFeatureModel. More... | |
Helps the creation of a IFeatureModel given a list of features, a model metadata, a feature model metadata and optionally a bounds.
luciad::FeatureModelBuilder::~FeatureModelBuilder | ( | ) |
luciad::FeatureModelBuilder::FeatureModelBuilder | ( | const FeatureModelBuilder & | other | ) |
|
noexcept |
FeatureModelBuilder & luciad::FeatureModelBuilder::bounds | ( | std::shared_ptr< Bounds > | bounds | ) |
Sets the bounds of the feature model.
Calling this function is optional.
If no bounds are provided, the model will attempt to derive the bounds by itself. It does so by calculating the union of the geometries of its features, as specified by Feature#findGeometry
.
bounds | The model bounds. Cannot be nullptr . |
luciad::NullArgumentException | when passing nullptr . |
std::shared_ptr< IFeatureModel > luciad::FeatureModelBuilder::build | ( | ) |
Creates a new in-memory IFeatureModel instance, based on the given model metadata, feature model metadata and the list of features.
Depending on whether the editable
flag was set, it is possible to add/remove or update the features of this model after it has been created.
LogicException | If not all mandatory parameters are set. |
FeatureModelBuilder & luciad::FeatureModelBuilder::editable | ( | bool | editable | ) |
Sets whether the model should be editable or not.
An editable model exposes an IFeatureModelUpdater
, through which you can add, remove or update the model's features. Calling this function is optional. By default, this value is false.
editable | whether the model should be editable or not. |
FeatureModelBuilder & luciad::FeatureModelBuilder::featureModelMetadata | ( | FeatureModelMetadata | featureModelMetadata | ) |
Sets the FeatureModelMetadata of the feature model.
Calling this function is mandatory.
featureModelMetadata | The model feature model metadata. |
FeatureModelBuilder & luciad::FeatureModelBuilder::features | ( | std::vector< Feature > | features | ) |
Sets the features of the feature model.
Calling this function is optional.
The given features may or may not have an id assigned
. If an id is missing, an id will be assigned to them by the resulting model.
features | The model features. |
FeatureModelBuilder & luciad::FeatureModelBuilder::modelMetadata | ( | ModelMetadata | modelMetadata | ) |
Sets the ModelMetadata of the feature model.
Calling this function is mandatory.
modelMetadata | The model metadata. |
|
static |
Returns the builder class for creation of the IFeatureModel.
|
noexcept |