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

Description of a parameter. More...

#include <Parameter.h>

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

Public Types

enum  AccessMode {
  NO_ACCESS, NONE_READ, NONE_WRITE, INITIALIZED_READ,
  INITIALIZED_WRITE, ACTIVATED_WRITE
}
 
enum  UpdateBehavior { PERSISTENT, PUSH, PULL, INTERNAL }
 

Public Member Functions

 Parameter (const unsigned int id, const VariantHandle &variant, ParameterGroup *const group=0)
 
AccessMode accessMode () const
 
void setAccessMode (const AccessMode mode)
 
UpdateBehavior updateBehavior () const
 
void setUpdateBehavior (const UpdateBehavior behavior)
 
virtual const Parametergroup () const
 
virtual const std::vector
< const Parameter * > & 
members () const
 
- Public Member Functions inherited from stromx::runtime::DescriptionBase
 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

Description of a parameter.

In addition to the information stored in the parent class parameter descriptions store information about the access mode of a given parameter. Moreover, parameter groups are supported.

Member Enumeration Documentation

The possible access modes of a parameter.

Status None Intialized Active Executing
NO_ACCESS - - - -
NONE_READ R R R R
NONE_WRITE R/W R R R
INITIALIZED_READ - R R R
INITIALIZED_WRITE - R/W R R
ACTIVATED_WRITE - R/W R/W R/W
Enumerator
NO_ACCESS 

The parameter can never be accessed.

NONE_READ 

The parameter can be read during each status of the operator.

NONE_WRITE 

The parameter can be read during each status of the operator. It can be written during the status Operator::NONE.

INITIALIZED_READ 

The parameter can be read during the status Operator::INITIALIZED, Operator::ACTIVE and Operator::EXECUTING.

INITIALIZED_WRITE 

This parameter can be read during the status Operator::INITIALIZED, Operator::ACTIVE and Operator::EXECUTING. It can be written during the status Operator::INITIALIZED.

ACTIVATED_WRITE 

This parameter can be read during the status Operator::INITIALIZED, Operator::ACTIVE and Operator::EXECUTING. It can be written during the status Operator::INITIALIZED, Operator::ACTIVE and Operator::EXECUTING.

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.

Constructor & Destructor Documentation

stromx::runtime::Parameter::Parameter ( const unsigned int  id,
const VariantHandle variant,
ParameterGroup *const  group = 0 
)

Constructs a parameter description.

Member Function Documentation

AccessMode stromx::runtime::Parameter::accessMode ( ) const
inline

Returns the access mode.

virtual const Parameter* stromx::runtime::Parameter::group ( ) const
inlinevirtual

Returns the group the parameter belongs to. Returns 0 if the parameter does not belong to any group.

virtual const std::vector<const Parameter*>& stromx::runtime::Parameter::members ( ) const
inlinevirtual

Returns the members of this parameter group. If the parameter is not a parameter group or it has no members the returned list is empty.

Reimplemented in stromx::runtime::ParameterGroup.

void stromx::runtime::Parameter::setAccessMode ( const AccessMode  mode)
inline

Sets the access mode.

void stromx::runtime::Parameter::setUpdateBehavior ( const UpdateBehavior  behavior)
inline

Sets the update behavior.

UpdateBehavior stromx::runtime::Parameter::updateBehavior ( ) const
inline

Returns the update behavior. The update behavior describes when the value of an operator might be updated parameter by either an action from the client (i.e. Operator::setParameter()) or by the operator itself.


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