openDAQ
Open data acquisition platform
ComponentTypeBuilderPtr Class Reference

Builder component of Component type objects. Contains setter methods to configure the Component type parameters, and a build method that builds the object. More...

Inherits ObjectPtr< IComponentTypeBuilder >.

Detailed Description

Builder component of Component type objects. Contains setter methods to configure the Component type parameters, and a build method that builds the object.

Depending on the set "Type" builder parameter, a different Component type is created - eg. Streaming type, Device type, Function block type, or Server type

Public Member Functions

daq::ComponentTypePtr build () const
 Builds and returns a Component type object using the currently set values of the Builder. More...
 
ComponentTypeBuilderPtr setId (const daq::StringPtr &id) const
 Sets the unique component type id. More...
 
daq::StringPtr getId () const
 Gets the unique component type id. More...
 
ComponentTypeBuilderPtr setTypeSort (daq::ComponentTypeSort sort) const
 Sets the component type sort. Can be either Streaming, Function block, Device, or Server. Depending on the setting, the corresponding Component type object will be built. More...
 
daq::ComponentTypeSort getTypeSort () const
 Gets the component type sort. Can be either Streaming, Function block, Device, or Server. Depending on the setting, the corresponding Component type object will be built. More...
 
ComponentTypeBuilderPtr setName (const daq::StringPtr &name) const
 Sets the user-friendly name of a component type. More...
 
daq::StringPtr getName () const
 Gets the user-friendly name of a component type. More...
 
ComponentTypeBuilderPtr setDescription (const daq::StringPtr &description) const
 Sets the description of a component type. More...
 
daq::StringPtr getDescription () const
 Gets the description of a component type. More...
 
ComponentTypeBuilderPtr setDefaultConfig (const daq::PropertyObjectPtr &defaultConfig) const
 Sets the default configuration object that will be cloned and passed to users by the built Component type when requested. More...
 
daq::PropertyObjectPtr getDefaultConfig () const
 Gets the default configuration object that will be cloned and passed to users by the built Component type when requested. More...
 

Member Function Documentation

◆ build()

daq::ComponentTypePtr build ( ) const
inline

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

Returns
The built Component type.

Depending on the set "sort" builder parameter, a different Component type is created - eg. Streaming type, Device type, Function block type, or Server type

◆ getDefaultConfig()

daq::PropertyObjectPtr getDefaultConfig ( ) const
inline

Gets the default configuration object that will be cloned and passed to users by the built Component type when requested.

Returns
The default configuration object.

Configuration objects are property object with user-defined key-value pairs. For example: Port=1000, OutputRate=5000, ...

◆ getDescription()

daq::StringPtr getDescription ( ) const
inline

Gets the description of a component type.

Returns
The description of a component type.

A short description of a component type and the associated configuration parameters it offers.

◆ getId()

daq::StringPtr getId ( ) const
inline

Gets the unique component type id.

Returns
The unique id of a component type.

Unique id should not be presented on the UI.

◆ getName()

daq::StringPtr getName ( ) const
inline

Gets the user-friendly name of a component type.

Returns
The user-friendly name of a component type.

Name is usually presented on the UI. Does not have to be unique.

◆ getTypeSort()

daq::ComponentTypeSort getTypeSort ( ) const
inline

Gets the component type sort. Can be either Streaming, Function block, Device, or Server. Depending on the setting, the corresponding Component type object will be built.

Returns
The sort of the component type.

◆ setDefaultConfig()

ComponentTypeBuilderPtr setDefaultConfig ( const daq::PropertyObjectPtr &  defaultConfig) const
inline

Sets the default configuration object that will be cloned and passed to users by the built Component type when requested.

Parameters
defaultConfigThe default configuration object.

Configuration objects are property object with user-defined key-value pairs. For example: Port=1000, OutputRate=5000, ...

◆ setDescription()

ComponentTypeBuilderPtr setDescription ( const daq::StringPtr &  description) const
inline

Sets the description of a component type.

Parameters
descriptionThe description of a component type.

A short description of a component type and the associated configuration parameters it offers.

◆ setId()

ComponentTypeBuilderPtr setId ( const daq::StringPtr &  id) const
inline

Sets the unique component type id.

Parameters
idThe unique id of a component type.

Unique id should not be presented on the UI.

◆ setName()

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

Sets the user-friendly name of a component type.

Parameters
nameThe user-friendly name of a component type.

Name is usually presented on the UI. Does not have to be unique.

◆ setTypeSort()

ComponentTypeBuilderPtr setTypeSort ( daq::ComponentTypeSort  sort) const
inline

Sets the component type sort. Can be either Streaming, Function block, Device, or Server. Depending on the setting, the corresponding Component type object will be built.

Parameters
sortThe sort of the component type.