openDAQ
Open data acquisition platform
DimensionBuilderPtr Class Reference

Configuration component of Dimension objects. Contains setter methods that allow for Dimension parameter configuration, and a build method that builds the Dimension. More...

Inherits ObjectPtr< IDimensionBuilder >.

Detailed Description

Configuration component of Dimension objects. Contains setter methods that allow for Dimension parameter configuration, and a build method that builds the Dimension.

Public Member Functions

daq::DimensionPtr build () const
 Builds and returns a Dimension object using the currently set values of the Builder. More...
 
DimensionBuilderPtr setName (const daq::StringPtr &name) const
 Sets the name of the dimension. More...
 
daq::StringPtr getName () const
 Gets the name of the dimension. More...
 
DimensionBuilderPtr setUnit (const daq::UnitPtr &unit) const
 Sets the unit of the dimension's labels. More...
 
daq::UnitPtr getUnit () const
 Gets the unit of the dimension's labels. More...
 
DimensionBuilderPtr setRule (const daq::DimensionRulePtr &rule) const
 Sets the rule that defines the labels and size of the dimension. More...
 
daq::DimensionRulePtr getRule () const
 Gets the rule that defines the labels and size of the dimension. More...
 

Member Function Documentation

◆ build()

daq::DimensionPtr build ( ) const
inline

Builds and returns a Dimension object using the currently set values of the Builder.

Returns
The built Dimension.

◆ getName()

daq::StringPtr getName ( ) const
inline

Gets the name of the dimension.

Returns
The name of the dimension.

◆ getRule()

daq::DimensionRulePtr getRule ( ) const
inline

Gets the rule that defines the labels and size of the dimension.

Returns
The dimension rule.

◆ getUnit()

daq::UnitPtr getUnit ( ) const
inline

Gets the unit of the dimension's labels.

Returns
The unit of the dimension.

◆ setName()

DimensionBuilderPtr setName ( const daq::StringPtr &  name) const
inline

Sets the name of the dimension.

Parameters
nameThe name of the dimension.

The name that best describes the dimension, in example "Frequency" for spectrum data.

◆ setRule()

DimensionBuilderPtr setRule ( const daq::DimensionRulePtr &  rule) const
inline

Sets the rule that defines the labels and size of the dimension.

Parameters
ruleThe dimension rule.
Exceptions
FrozenExceptionif the dimension object is frozen.

The rule takes as input the index of data value in a sample and produces a label associated with that index.

◆ setUnit()

DimensionBuilderPtr setUnit ( const daq::UnitPtr &  unit) const
inline

Sets the unit of the dimension's labels.

Parameters
unitThe unit of the dimension.