![]() |
stromx
0.7.0
|
Abstract description of an ID to variant map. More...
#include <DescriptionBase.h>
Public Member Functions | |
| DescriptionBase (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 |
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 nodes, output nodes 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 DescriptionBase can have a name which is purely informal and does not have any influence on its behavior.
| stromx::runtime::DescriptionBase::DescriptionBase | ( | 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::MatrixDescription, and stromx::runtime::MatrixParameter.
|
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 |
Returns the required number of rows of a matrix parameters. Returns 0 if any number of rows is possible.
Reimplemented in stromx::runtime::MatrixDescription, and stromx::runtime::MatrixParameter.
|
inline |
Sets the title of the description.
| void stromx::runtime::DescriptionBase::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.8