![]() |
stromx
0.8.0
|
Abstract description of an ID to variant map. More...
#include <Description.h>
Public Types | |
| enum | Type { NO_TYPE, PARAMETER, INPUT, OUTPUT } |
| enum | UpdateBehavior { PERSISTENT, PUSH, PULL, INTERNAL } |
Public Member Functions | |
| Description (const unsigned int id, const VariantHandle &variant) | |
| const std::string & | title () const |
| unsigned int | id () const |
| const VariantHandle & | variant () const |
| void | setTitle (const std::string &title) |
| const VariantHandle & | visualization () const |
| void | setVisualization (const VariantHandle &visualization) |
| virtual const Data & | max () const |
| virtual const Data & | min () const |
| virtual const Data & | step () const |
| virtual const std::vector< EnumDescription > & | descriptions () const |
| virtual unsigned int | rows () const |
| virtual unsigned int | cols () const |
| virtual Type | originalType () const |
| virtual Type | currentType () const |
Abstract description of an ID to variant map.
Instances of this class associate an ID with a data variant. Moreover the contain meta information of the data characterized by this mapping. Input connectors, output connectors and parameters of operators are characterized by such a description. In case of input and output nodes the data variant defines which data type can be passed to an input node or is to be expected from an output node. In case of parameter it characterizes the data type of the respective paramter. In addition, a Description can have a name which is purely informal and does not have any influence on its behavior.
The update behavior of operator parameters.
| Enumerator | |
|---|---|
| PERSISTENT | The value of this parameter will only change when it is explicitly set by Operator::setParameter(). In general, it is not necessary to set a persistent parameter to the same value more than once as it will hold the correct value after the first change. In the same spirit a read value can be considered to be "real" value until the parameter is changed by the user. This is the default behavior of parameters. |
| PUSH | The value of this parameter can be set but reading the parameter does not necessarily return a meaningful result. E.g. setting a trigger parameter causes an action to be performed whenever the parameter is set. In general it makes sense set send parameters more than once. |
| PULL | Snapshots of the value of this parameter can be read but setting it does not have a meaningful effect. E.g. the current state of a classifier operator which learns while being executed could be queried from a pull parameters. In general it makes to frequently read receive parameters. |
| INTERNAL | This parameter is only internally used by the operator. It makes no sense to read or write its values from outside. In a GUI an internal parameter would not be displayed. |
| stromx::runtime::Description::Description | ( | const unsigned int | id, |
| const VariantHandle & | variant | ||
| ) |
Constructs a description.
|
inlinevirtual |
Returns the required number of columns of a matrix parameters. Returns 0 if any number of columns is possible.
Reimplemented in stromx::runtime::ConnectorDescription, and stromx::runtime::MatrixParameter.
|
inlinevirtual |
Input and output connectors can be configured to act as operator parameters. Such a connector is listed as an operator parameter. The current type always refers to way the connector is currently configured, i.e. possibly as a parameter.
Reimplemented in stromx::runtime::Parameter, stromx::runtime::Input, and stromx::runtime::Output.
|
inlinevirtual |
Returns the possible values of an enumeration value or an empty vector.
Reimplemented in stromx::runtime::EnumParameter.
|
inline |
Returns the ID.
|
inlinevirtual |
Returns the maximal value of this data value or an instance of None.
Reimplemented in stromx::runtime::NumericParameter< data_t >, and stromx::runtime::NumericParameter< runtime::stromx::runtime::Primitive >.
|
inlinevirtual |
Returns the minimal value of this data value or an instance of None.
Reimplemented in stromx::runtime::NumericParameter< data_t >, and stromx::runtime::NumericParameter< runtime::stromx::runtime::Primitive >.
|
inlinevirtual |
Input and output connectors can be configured to act as operator parameters. Such a connector is listed as an operator parameter. Its original type however remains that of a connector and signals the client that the parameter can be configured back to a connector if necessary.
Reimplemented in stromx::runtime::Parameter, stromx::runtime::Input, and stromx::runtime::Output.
|
inlinevirtual |
Returns the required number of rows of a matrix parameters. Returns 0 if any number of rows is possible.
Reimplemented in stromx::runtime::ConnectorDescription, and stromx::runtime::MatrixParameter.
|
inline |
Sets the title of the description.
| void stromx::runtime::Description::setVisualization | ( | const VariantHandle & | visualization | ) |
Sets the visualization of this description.
|
inlinevirtual |
Returns a useful step size to decrease or increase the value of this parameter. Returns NONE if no step size is defined for this parameter.
Reimplemented in stromx::runtime::NumericParameter< data_t >, and stromx::runtime::NumericParameter< runtime::stromx::runtime::Primitive >.
|
inline |
Returns the title.
|
inline |
Returns the data variant of this value.
|
inline |
Returns how this data value should be visualized or an instance of Variant::None.
1.8.12