stromx  0.7.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
stromx::runtime::DescriptionBase Class Reference

Abstract description of an ID to variant map. More...

#include <DescriptionBase.h>

Inheritance diagram for stromx::runtime::DescriptionBase:
stromx::runtime::Description stromx::runtime::Parameter stromx::runtime::MatrixDescription stromx::runtime::NumericParameter< runtime::stromx::runtime::Primitive > stromx::runtime::EnumParameter stromx::runtime::MatrixParameter stromx::runtime::NumericParameter< data_t > stromx::runtime::ParameterGroup

Public Member Functions

 DescriptionBase (const unsigned int id, const VariantHandle &variant)
 
const std::string & title () const
 
unsigned int id () const
 
const VariantHandlevariant () const
 
void setTitle (const std::string &title)
 
const VariantHandlevisualization () const
 
void setVisualization (const VariantHandle &visualization)
 
virtual const Datamax () const
 
virtual const Datamin () const
 
virtual const Datastep () const
 
virtual const std::vector
< EnumDescription > & 
descriptions () const
 
virtual unsigned int rows () const
 
virtual unsigned int cols () const
 

Detailed Description

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.

Constructor & Destructor Documentation

stromx::runtime::DescriptionBase::DescriptionBase ( const unsigned int  id,
const VariantHandle variant 
)

Constructs a description.

Member Function Documentation

virtual unsigned int stromx::runtime::DescriptionBase::cols ( ) const
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.

virtual const std::vector<EnumDescription>& stromx::runtime::DescriptionBase::descriptions ( ) const
inlinevirtual

Returns the possible values of an enumeration value or an empty vector.

Reimplemented in stromx::runtime::EnumParameter.

unsigned int stromx::runtime::DescriptionBase::id ( ) const
inline

Returns the ID.

virtual const Data& stromx::runtime::DescriptionBase::max ( ) const
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 >.

virtual const Data& stromx::runtime::DescriptionBase::min ( ) const
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 >.

virtual unsigned int stromx::runtime::DescriptionBase::rows ( ) const
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.

void stromx::runtime::DescriptionBase::setTitle ( const std::string &  title)
inline

Sets the title of the description.

void stromx::runtime::DescriptionBase::setVisualization ( const VariantHandle visualization)

Sets the visualization of this description.

virtual const Data& stromx::runtime::DescriptionBase::step ( ) const
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 >.

const std::string& stromx::runtime::DescriptionBase::title ( ) const
inline

Returns the title.

const VariantHandle& stromx::runtime::DescriptionBase::variant ( ) const
inline

Returns the data variant of this value.

const VariantHandle& stromx::runtime::DescriptionBase::visualization ( ) const
inline

Returns how this data value should be visualized or an instance of Variant::None.


The documentation for this class was generated from the following files: