LuciadCPillar C# 2023.1.04
Luciad.Models.Features.Feature.Builder Class Reference

Allows the incremental creation of a Feature object. More...

Inheritance diagram for Luciad.Models.Features.Feature.Builder:

Public Member Functions

 Builder (Luciad.Models.Features.Feature.Builder other)
 
Luciad.Models.Features.Feature Build ()
 Build the feature using the settings configured. More...
 
Luciad.Models.Features.Feature.Builder DataType (Luciad.Datamodels.DataType dataType)
 Configures the dataType of the feature being built. More...
 
void Dispose ()
 
Luciad.Models.Features.Feature.Builder Id (ulong id)
 Configures the id of the feature being built. More...
 
Luciad.Models.Features.Feature.Builder ResetId ()
 Resets the id. More...
 
Builder ResetValue< T > (Luciad.Datamodels.DataPropertyPath propertyPath)
 Resets the value associated with the given property. More...
 
Builder Value< T > (Luciad.Datamodels.DataPropertyPath propertyPath, T value)
 Sets the value associated with the given property. More...
 

Detailed Description

Allows the incremental creation of a Feature object.

Make sure to configure the dataType() before calling value() configure the id() and dataType() before finishing the Feature using build()

Otherwise a LogicException will be thrown.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::Builder.

Constructor & Destructor Documentation

◆ Builder()

Luciad.Models.Features.Feature.Builder.Builder ( Luciad.Models.Features.Feature.Builder  other)
inline

Member Function Documentation

◆ Build()

Luciad.Models.Features.Feature Luciad.Models.Features.Feature.Builder.Build ( )
inline

Build the feature using the settings configured.

After this method is invoked once, this builder can no longer be used. the feature

LogicException

if the id or dataType are not configured

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::Builder::build.

◆ DataType()

Luciad.Models.Features.Feature.Builder Luciad.Models.Features.Feature.Builder.DataType ( Luciad.Datamodels.DataType  dataType)
inline

Configures the dataType of the feature being built.

The DataType needs to be set before value() is called.

dataType

the data type

this builder

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::Builder::dataType.

◆ Dispose()

void Luciad.Models.Features.Feature.Builder.Dispose ( )
inline

◆ Id()

Luciad.Models.Features.Feature.Builder Luciad.Models.Features.Feature.Builder.Id ( ulong  id)
inline

Configures the id of the feature being built.

A feature id should be unique across a model. This method is not mandatory, though Features in a model must have an id. It is allowed to temporarily have features without id, for example during Feature creation. As soon as such a temporary Feature is added to a model, it must be assigned an id though. When no id is set, Feature::getId will throw an exception.

id

the id

this builder

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::Builder::id.

◆ ResetId()

Luciad.Models.Features.Feature.Builder Luciad.Models.Features.Feature.Builder.ResetId ( )
inline

Resets the id.

Calling this method will cause the built Feature to have no id, thus throwing an exception when calling Feature::getId. Features in a model must have an id. It is allowed to temporarily have features without id, for example during Feature creation. As soon as such a temporary Feature is added to a model, it must be assigned an id though. Note that for a newly created Feature::Builder using the Feature::newBuilder() method, the id will be empty by default. This method is less useful in that case. It is mainly useful when using the Feature::asBuilder() method. this builder

2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::Builder::resetId.

◆ ResetValue< T >()

Luciad.Models.Features.Feature.Builder Luciad.Models.Features.Feature.Builder.ResetValue< T > ( Luciad.Datamodels.DataPropertyPath  propertyPath)
inline

Resets the value associated with the given property.

Calling this method will cause the built Feature to return an empty optional for the given property. Note that for a newly created Feature::Builder using the Feature::newBuilder() method, all values will be empty by default. This method is less useful in that case. It is mainly useful when using the Feature::asBuilder() method.

T

the supported types are bool, int32_t, int64_t, float, double, std::string and std::shared_ptr<luciad::Geometry>

propertyPath

the property for which to reset the value

this builder

InvalidArgumentException

when the dataType has not been configured yet, the property is not of a known type, or if it doesn't exist in the DataType.

2020.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::Builder::resetValue.

◆ Value< T >()

Luciad.Models.Features.Feature.Builder Luciad.Models.Features.Feature.Builder.Value< T > ( Luciad.Datamodels.DataPropertyPath  propertyPath,
value 
)
inline

Sets the value associated with the given property.

Example

T

the supported types are bool, int32_t, int64_t, float, double, std::string and std::shared_ptr<luciad::Geometry>

propertyPath

the property for which to set the value

value

the value

this builder

InvalidArgumentException

when the dataType has not been configured yet, the property is not of a known type, or if it doesn't exist in the DataType.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::Builder::value.