LuciadCPillar 2023.1.05
luciad::DataProperty::Builder Class Referencefinal

Builder that allows DataProperty instances to be created. More...

#include <luciad/datamodels/DataProperty.h>

Public Member Functions

 Builder (Builder &&other) noexcept
 
 Builder (const Builder &other)
 
 ~Builder ()
 
DataProperty build ()
 Build the data type, including the value type that was set on this builder. More...
 
Buildername (std::string name)
 Sets the name of the data property. More...
 
Builderoperator= (Builder other) noexcept
 
BuildervalueType (DataType type)
 Sets the data type for the data property under construction. More...
 

Detailed Description

Builder that allows DataProperty instances to be created.

Typical usage would be create a DataProperty::Builder using DataProperty::newBuilder, specifying the data property's name. Then specify the value type and finally build() the data property. The following snippet shows how this is done for a simple example data property:

Builder & valueType(DataType type)
Sets the data type for the data property under construction.
DataProperty build()
Build the data type, including the value type that was set on this builder.
Builder & name(std::string name)
Sets the name of the data property.
static Builder newBuilder()
Creates a new DataProperty builder.
static const DataType & getGeometryType()

Constructor & Destructor Documentation

◆ Builder() [1/2]

luciad::DataProperty::Builder::Builder ( const Builder other)

◆ Builder() [2/2]

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

◆ ~Builder()

luciad::DataProperty::Builder::~Builder ( )

Member Function Documentation

◆ build()

DataProperty luciad::DataProperty::Builder::build ( )

Build the data type, including the value type that was set on this builder.

After calling this function, this builder should no longer be used.

Returns
the data type.
Exceptions
luciad::LogicExceptionIf not all mandatory parameters are set.

◆ name()

Builder & luciad::DataProperty::Builder::name ( std::string  name)

Sets the name of the data property.

Calling this function is mandatory.

Parameters
namename of the data property.
Returns
this builder.

◆ operator=()

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

◆ valueType()

Builder & luciad::DataProperty::Builder::valueType ( DataType  type)

Sets the data type for the data property under construction.

Calling this function is mandatory.

Parameters
typethe data type for the data property under construction.
Returns
this builder.