openDAQ
Open data acquisition platform
+ Collaboration diagram for Factories:

Detailed Description

Functions

 OPENDAQ_DECLARE_CLASS_FACTORY_WITH_INTERFACE (LIBRARY_FACTORY, UnitBuilder, IUnitBuilder) OPENDAQ_DECLARE_CLASS_FACTORY_WITH_INTERFACE(LIBRARY_FACTORY
 Creates a UnitConfig with no parameters configured. More...
 
UnitPtr Unit (const StringPtr &symbol, const Int id=-1, const StringPtr &name="", const StringPtr &quantity="")
 Creates a Unit with its id, symbol, name, and quantity fields configured. More...
 
UnitPtr UnitFromBuilder (const UnitBuilderPtr &builder)
 Creates a Unit with Builder. More...
 
UnitBuilderPtr UnitBuilder ()
 Creates a UnitBuilder with no parameters configured.
 
UnitBuilderPtr UnitBuilderCopy (const UnitPtr &unit)
 UnitBuilderPtr copy factory that creates a Unit Builder object from a non-configurable UnitPtr. More...
 
StructTypePtr UnitStructType ()
 Creates the Struct type object that defines the Unit struct.
 
ComponentTypeBuilderPtr StreamingTypeBuilder ()
 Creates a ComponentTypeBuilder with the type sort set to "Streaming".
 
ComponentTypeBuilderPtr DeviceTypeBuilder ()
 Creates a ComponentTypeBuilder with the type sort set to "Device".
 
ComponentTypeBuilderPtr FunctionBlockTypeBuilder ()
 Creates a ComponentTypeBuilder with the type sort set to "FunctionBlock".
 
ComponentTypeBuilderPtr ServerTypeBuilder ()
 Creates a ComponentTypeBuilder with the type sort set to "Server".
 

Function Documentation

◆ OPENDAQ_DECLARE_CLASS_FACTORY_WITH_INTERFACE()

OPENDAQ_DECLARE_CLASS_FACTORY_WITH_INTERFACE ( LIBRARY_FACTORY  ,
UnitBuilder  ,
IUnitBuilder   
)

Creates a UnitConfig with no parameters configured.

UnitConfig copy factory that creates a configurable Unit object from a possibly non-configurable Unit.

Parameters
unitToCopyThe Unit of which configuration should be copied.

◆ Unit()

UnitPtr Unit ( const StringPtr symbol,
const Int  id = -1,
const StringPtr name = "",
const StringPtr quantity = "" 
)
inline

Creates a Unit with its id, symbol, name, and quantity fields configured.

Parameters
idThe unit ID as defined in Codes for Units of Measurement used in International Trade.
symbolThe symbol of the unit, i.e. "m/s".
nameThe full name of the unit, i.e. "meters per second". (optional)
quantityThe quantity represented by the unit, i.e. "Velocity". (optional)

◆ UnitBuilderCopy()

UnitBuilderPtr UnitBuilderCopy ( const UnitPtr unit)
inline

UnitBuilderPtr copy factory that creates a Unit Builder object from a non-configurable UnitPtr.

Parameters
unitThe Unit of which configuration should be copied.

◆ UnitFromBuilder()

UnitPtr UnitFromBuilder ( const UnitBuilderPtr builder)
inline

Creates a Unit with Builder.

Parameters
builderUnit Builder