openDAQ
Open data acquisition platform
IPropertyBuilder Struct Referenceabstract

The builder interface of Properties. Allows for construction of Properties through the build method. More...

+ Inheritance diagram for IPropertyBuilder:
+ Collaboration diagram for IPropertyBuilder:

Detailed Description

The builder interface of Properties. Allows for construction of Properties through the build method.

Contains setters for the Property fields. The setters take as parameters openDAQ objects, even if the value must always evaluate to, for example, a boolean. This allows for EvalValue objects to be set instead of a static value.

The EvalValue objects can evaluate to Boolean, String, List, Unit, and Property types. and can thus be used when such types are expected from the getters.

The Property can be built by calling the build method.

Public Member Functions

virtual ErrCode INTERFACE_FUNC build (IProperty **property)=0
 Builds and returns a Property using the currently set values of the Builder. More...
 
virtual ErrCode INTERFACE_FUNC setValueType (CoreType type)=0
 Sets the Value type of the Property. Values written to the corresponding Property value must be of the same type. More...
 
virtual ErrCode INTERFACE_FUNC getValueType (CoreType *type)=0
 Gets the Value type of the Property. More...
 
virtual ErrCode INTERFACE_FUNC setName (IString *name)=0
 Sets the Name of the Property. The names of Properties in a Property object must be unique. The name is used as the key to the corresponding Property value when getting/setting the value. More...
 
virtual ErrCode INTERFACE_FUNC getName (IString **name)=0
 Gets the Name of the Property. More...
 
virtual ErrCode INTERFACE_FUNC setDescription (IString *description)=0
 Sets the short string Description of the Property. More...
 
virtual ErrCode INTERFACE_FUNC getDescription (IString **description)=0
 Gets the short string Description of the Property. More...
 
virtual ErrCode INTERFACE_FUNC setUnit (IUnit *unit)=0
 Sets the Unit of the Property. More...
 
virtual ErrCode INTERFACE_FUNC getUnit (IUnit **unit)=0
 Gets the Unit of the Property. More...
 
virtual ErrCode INTERFACE_FUNC setMinValue (INumber *min)=0
 Sets the Minimum value of the Property. Available only if the Value type is ctInt or ctFloat. More...
 
virtual ErrCode INTERFACE_FUNC getMinValue (INumber **min)=0
 Gets the Minimum value of the Property. Available only if the Value type is ctInt or ctFloat. More...
 
virtual ErrCode INTERFACE_FUNC setMaxValue (INumber *max)=0
 Sets the Maximum value of the Property. Available only if the Value type is ctInt or ctFloat. More...
 
virtual ErrCode INTERFACE_FUNC getMaxValue (INumber **max)=0
 Gets the Maximum value of the Property. Available only if the Value type is ctInt or ctFloat. More...
 
virtual ErrCode INTERFACE_FUNC setDefaultValue (IBaseObject *value)=0
 Sets the Default value of the Property. The Default value must always be configured for a Property to be in a valid state. Exceptions are Function/Procedure and Reference properties. The function will freeze default value if it is freezable. More...
 
virtual ErrCode INTERFACE_FUNC getDefaultValue (IBaseObject **value)=0
 Gets the Default value of the Property. More...
 
virtual ErrCode INTERFACE_FUNC setSuggestedValues (IList *values)=0
 Sets the list of Suggested values. Contains values that are the optimal settings for the corresponding Property value. These values, however, are not enforced when setting a new Property value. More...
 
virtual ErrCode INTERFACE_FUNC getSuggestedValues (IList **values)=0
 Gets the list of Suggested values. Contains values that are the optimal gettings for the corresponding Property value. These values, however, are not enforced when getting a new Property value. More...
 
virtual ErrCode INTERFACE_FUNC setVisible (IBoolean *visible)=0
 Used to determine whether the property is visible or not. More...
 
virtual ErrCode INTERFACE_FUNC getVisible (IBoolean **visible)=0
 Used to determine whether the property is visible or not. More...
 
virtual ErrCode INTERFACE_FUNC setReadOnly (IBoolean *readOnly)=0
 Used to determine whether the Property is a read-only property or not. More...
 
virtual ErrCode INTERFACE_FUNC getReadOnly (IBoolean **readOnly)=0
 Used to determine whether the Property is a read-only property or not. More...
 
virtual ErrCode INTERFACE_FUNC setSelectionValues (IBaseObject *values)=0
 Sets the list or dictionary of selection values. If the list/dictionary is not empty, the property is a Selection property, and must have the Value type ctInt. More...
 
virtual ErrCode INTERFACE_FUNC getSelectionValues (IBaseObject **values)=0
 Gets the list or dictionary of selection values. More...
 
virtual ErrCode INTERFACE_FUNC setReferencedProperty (IEvalValue *propertyEval)=0
 Sets the referenced property. If set, all getters except for the Name, Referenced property, and Is referenced getters will return the value of the Referenced property. More...
 
virtual ErrCode INTERFACE_FUNC getReferencedProperty (IEvalValue **propertyEval)=0
 Gets the referenced property. More...
 
virtual ErrCode INTERFACE_FUNC setValidator (IValidator *validator)=0
 Sets the validator of the Property. More...
 
virtual ErrCode INTERFACE_FUNC getValidator (IValidator **validator)=0
 Gets the validator of the Property. More...
 
virtual ErrCode INTERFACE_FUNC setCoercer (ICoercer *coercer)=0
 Sets the coercer of the Property. More...
 
virtual ErrCode INTERFACE_FUNC getCoercer (ICoercer **coercer)=0
 Gets the coercer of the Property. More...
 
virtual ErrCode INTERFACE_FUNC setCallableInfo (ICallableInfo *callable)=0
 Sets the Callable information objects of the Property that specifies the argument and return types of the callable object stored as the Property value. More...
 
virtual ErrCode INTERFACE_FUNC getCallableInfo (ICallableInfo **callable)=0
 Gets the Callable information objects of the Property that specifies the argument and return types of the callable object stored as the Property value. More...
 
virtual ErrCode INTERFACE_FUNC setOnPropertyValueWrite (IEvent *event)=0
 Sets a custom on-write event. Used mostly when cloning properties. More...
 
virtual ErrCode INTERFACE_FUNC getOnPropertyValueWrite (IEvent **event)=0
 Gets a custom on-write event. Used mostly when cloning properties. More...
 
virtual ErrCode INTERFACE_FUNC setOnPropertyValueRead (IEvent *event)=0
 Sets a custom on-read event. Used mostly when cloning properties. More...
 
virtual ErrCode INTERFACE_FUNC getOnPropertyValueRead (IEvent **event)=0
 Gets a custom on-read event. Used mostly when cloning properties. More...
 
- Public Member Functions inherited from IBaseObject
virtual ErrCode INTERFACE_FUNC borrowInterface (const IntfID &intfID, void **obj) const =0
 Returns another interface which is supported by the object without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC dispose ()=0
 Disposes all references held by the object. More...
 
virtual ErrCode INTERFACE_FUNC getHashCode (SizeT *hashCode)=0
 Returns hash code of the object. More...
 
virtual ErrCode INTERFACE_FUNC equals (IBaseObject *other, Bool *equal) const =0
 Compares object to another object for equality. More...
 
virtual ErrCode INTERFACE_FUNC toString (CharPtr *str)=0
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from IUnknown
virtual ErrCode INTERFACE_FUNC queryInterface (const IntfID &intfID, void **obj)=0
 Returns another interface which is supported by the object and increments the reference count. More...
 
virtual int INTERFACE_FUNC addRef ()=0
 Increments the reference count for an interface on an object. More...
 
virtual int INTERFACE_FUNC releaseRef ()=0
 Decrements the reference count for an interface on an object. More...
 

Member Function Documentation

◆ build()

virtual ErrCode INTERFACE_FUNC build ( IProperty **  property)
pure virtual

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

Parameters
[out]propertyThe built property.

◆ getCallableInfo()

virtual ErrCode INTERFACE_FUNC getCallableInfo ( ICallableInfo **  callable)
pure virtual

Gets the Callable information objects of the Property that specifies the argument and return types of the callable object stored as the Property value.

Parameters
[out]callableThe Callable info object.

◆ getCoercer()

virtual ErrCode INTERFACE_FUNC getCoercer ( ICoercer **  coercer)
pure virtual

Gets the coercer of the Property.

Parameters
[out]coercerThe coercer.

◆ getDefaultValue()

virtual ErrCode INTERFACE_FUNC getDefaultValue ( IBaseObject **  value)
pure virtual

Gets the Default value of the Property.

Parameters
[out]valueThe Default value of the Property.

◆ getDescription()

virtual ErrCode INTERFACE_FUNC getDescription ( IString **  description)
pure virtual

Gets the short string Description of the Property.

Parameters
[out]descriptionThe Description of the Property.

◆ getMaxValue()

virtual ErrCode INTERFACE_FUNC getMaxValue ( INumber **  max)
pure virtual

Gets the Maximum value of the Property. Available only if the Value type is ctInt or ctFloat.

Parameters
[out]maxThe Maximum value of the Property.

◆ getMinValue()

virtual ErrCode INTERFACE_FUNC getMinValue ( INumber **  min)
pure virtual

Gets the Minimum value of the Property. Available only if the Value type is ctInt or ctFloat.

Parameters
[out]minThe Minimum value of the Property.

◆ getName()

virtual ErrCode INTERFACE_FUNC getName ( IString **  name)
pure virtual

Gets the Name of the Property.

Parameters
[out]nameThe Name of the Property.

◆ getOnPropertyValueRead()

virtual ErrCode INTERFACE_FUNC getOnPropertyValueRead ( IEvent **  event)
pure virtual

Gets a custom on-read event. Used mostly when cloning properties.

Parameters
[out]eventThe on-read event.

◆ getOnPropertyValueWrite()

virtual ErrCode INTERFACE_FUNC getOnPropertyValueWrite ( IEvent **  event)
pure virtual

Gets a custom on-write event. Used mostly when cloning properties.

Parameters
[out]eventThe on-write event.

◆ getReadOnly()

virtual ErrCode INTERFACE_FUNC getReadOnly ( IBoolean **  readOnly)
pure virtual

Used to determine whether the Property is a read-only property or not.

Parameters
[out]readOnlyTrue if the Property is a read-only property; false otherwise.

◆ getReferencedProperty()

virtual ErrCode INTERFACE_FUNC getReferencedProperty ( IEvalValue **  propertyEval)
pure virtual

Gets the referenced property.

Parameters
[out]propertyEvalThe referenced property.

◆ getSelectionValues()

virtual ErrCode INTERFACE_FUNC getSelectionValues ( IBaseObject **  values)
pure virtual

Gets the list or dictionary of selection values.

Parameters
[out]valuesThe list/dictionary of possible selection values.

◆ getSuggestedValues()

virtual ErrCode INTERFACE_FUNC getSuggestedValues ( IList **  values)
pure virtual

Gets the list of Suggested values. Contains values that are the optimal gettings for the corresponding Property value. These values, however, are not enforced when getting a new Property value.

Parameters
[out]valuesThe Suggested values of the Property.

◆ getUnit()

virtual ErrCode INTERFACE_FUNC getUnit ( IUnit **  unit)
pure virtual

Gets the Unit of the Property.

Parameters
[out]unitThe Unit of the Property.

◆ getValidator()

virtual ErrCode INTERFACE_FUNC getValidator ( IValidator **  validator)
pure virtual

Gets the validator of the Property.

Parameters
[out]validatorThe validator.

◆ getValueType()

virtual ErrCode INTERFACE_FUNC getValueType ( CoreType type)
pure virtual

Gets the Value type of the Property.

Parameters
[out]typeThe value type.

◆ getVisible()

virtual ErrCode INTERFACE_FUNC getVisible ( IBoolean **  visible)
pure virtual

Used to determine whether the property is visible or not.

Parameters
[out]visibleTrue if the Property is visible; false otherwise.

◆ setCallableInfo()

virtual ErrCode INTERFACE_FUNC setCallableInfo ( ICallableInfo callable)
pure virtual

Sets the Callable information objects of the Property that specifies the argument and return types of the callable object stored as the Property value.

Parameters
callableThe Callable info object.

◆ setCoercer()

virtual ErrCode INTERFACE_FUNC setCoercer ( ICoercer coercer)
pure virtual

Sets the coercer of the Property.

Parameters
coercerThe coercer.

Used to coerce a value written to the corresponding Property value to the constraints specified by the coercer.

◆ setDefaultValue()

virtual ErrCode INTERFACE_FUNC setDefaultValue ( IBaseObject value)
pure virtual

Sets the Default value of the Property. The Default value must always be configured for a Property to be in a valid state. Exceptions are Function/Procedure and Reference properties. The function will freeze default value if it is freezable.

Parameters
valueThe Default value of the Property.

◆ setDescription()

virtual ErrCode INTERFACE_FUNC setDescription ( IString description)
pure virtual

Sets the short string Description of the Property.

Parameters
descriptionThe Description of the Property.

◆ setMaxValue()

virtual ErrCode INTERFACE_FUNC setMaxValue ( INumber max)
pure virtual

Sets the Maximum value of the Property. Available only if the Value type is ctInt or ctFloat.

Parameters
maxThe Maximum value of the Property.

◆ setMinValue()

virtual ErrCode INTERFACE_FUNC setMinValue ( INumber min)
pure virtual

Sets the Minimum value of the Property. Available only if the Value type is ctInt or ctFloat.

Parameters
minThe Minimum value of the Property.

◆ setName()

virtual ErrCode INTERFACE_FUNC setName ( IString name)
pure virtual

Sets the Name of the Property. The names of Properties in a Property object must be unique. The name is used as the key to the corresponding Property value when getting/setting the value.

Parameters
nameThe Name of the Property.

◆ setOnPropertyValueRead()

virtual ErrCode INTERFACE_FUNC setOnPropertyValueRead ( IEvent *  event)
pure virtual

Sets a custom on-read event. Used mostly when cloning properties.

Parameters
eventThe on-read event.

◆ setOnPropertyValueWrite()

virtual ErrCode INTERFACE_FUNC setOnPropertyValueWrite ( IEvent *  event)
pure virtual

Sets a custom on-write event. Used mostly when cloning properties.

Parameters
eventThe on-write event.

◆ setReadOnly()

virtual ErrCode INTERFACE_FUNC setReadOnly ( IBoolean readOnly)
pure virtual

Used to determine whether the Property is a read-only property or not.

Parameters
readOnlyTrue if the Property is a read-only property; false otherwise.

Read-only Property values can still be modified by using the PropertyObjectProtected interface methods.

◆ setReferencedProperty()

virtual ErrCode INTERFACE_FUNC setReferencedProperty ( IEvalValue propertyEval)
pure virtual

Sets the referenced property. If set, all getters except for the Name, Referenced property, and Is referenced getters will return the value of the Referenced property.

Parameters
propertyEvalThe referenced property.

If the Property is not bound to a Property object this call will not be able to return the Referenced property.

◆ setSelectionValues()

virtual ErrCode INTERFACE_FUNC setSelectionValues ( IBaseObject values)
pure virtual

Sets the list or dictionary of selection values. If the list/dictionary is not empty, the property is a Selection property, and must have the Value type ctInt.

Parameters
valuesThe list/dictionary of possible selection values.

◆ setSuggestedValues()

virtual ErrCode INTERFACE_FUNC setSuggestedValues ( IList values)
pure virtual

Sets the list of Suggested values. Contains values that are the optimal settings for the corresponding Property value. These values, however, are not enforced when setting a new Property value.

Parameters
valuesThe Suggested values of the Property.

◆ setUnit()

virtual ErrCode INTERFACE_FUNC setUnit ( IUnit unit)
pure virtual

Sets the Unit of the Property.

Parameters
unitThe Unit of the Property.

◆ setValidator()

virtual ErrCode INTERFACE_FUNC setValidator ( IValidator validator)
pure virtual

Sets the validator of the Property.

Parameters
validatorThe validator.

Used to validate whether a value written to the corresponding Property value is valid or not.

◆ setValueType()

virtual ErrCode INTERFACE_FUNC setValueType ( CoreType  type)
pure virtual

Sets the Value type of the Property. Values written to the corresponding Property value must be of the same type.

Parameters
typeThe value type.

◆ setVisible()

virtual ErrCode INTERFACE_FUNC setVisible ( IBoolean visible)
pure virtual

Used to determine whether the property is visible or not.

Parameters
visibleTrue if the Property is visible; false otherwise.