AuboCaps  0.6.0
arcs::aubo_scope::VariableFactory Class Reference

#include <variable_factory.h>

Public Member Functions

 VariableFactory (VariableFactory &f)
 
 VariableFactory (VariableFactory &&f)
 
 ~VariableFactory ()
 
GlobalVariablePtr createGlobalVariable (const std::string &suggested_name)
 
GlobalVariablePtr createGlobalVariable (const std::string &suggested_name, ExpressionPtr initialValue)
 
FeatureVariablePtr createFeatureVariable (const std::string &suggested_name, const std::vector< double > &pose)
 

Private Member Functions

 VariableFactory ()
 

Private Attributes

void * d_ { nullptr }
 

Friends

class DataSwitch
 

Detailed Description

This interface supplies methods to create variable objects.

NOTE: Only use this functionality in a AuboCap program node (not relevant for an installation node).

Definition at line 20 of file variable_factory.h.

Constructor & Destructor Documentation

arcs::aubo_scope::VariableFactory::VariableFactory ( VariableFactory f)
arcs::aubo_scope::VariableFactory::VariableFactory ( VariableFactory &&  f)
arcs::aubo_scope::VariableFactory::~VariableFactory ( )
arcs::aubo_scope::VariableFactory::VariableFactory ( )
private

Member Function Documentation

FeatureVariablePtr arcs::aubo_scope::VariableFactory::createFeatureVariable ( const std::string &  suggested_name,
const std::vector< double > &  pose 
)

Creates a feature variable.

Registering the variable in AuboScope (by storing it in a DataModel instance or using it for the configuration of a built-in AuboScope program node) will make it accessible to all program nodes.

Setting an initial value will make it possible to read from the variable immediately without having to assign a value to it first. This can be useful in various constructs which requires an initial valu.

NOTE: Only use this method in a AuboCap program node (not relevant for an installation node).

Parameters
suggested_nameSuggested name of the variable. Valid names must match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters.
initialValueThe expression that will be evaluated in order to initialize the value of the variable. This value is assigned before the actual program runs.
Returns
FeatureVariable.
Exceptions
VariableExceptionIn case of an illegal name.
GlobalVariablePtr arcs::aubo_scope::VariableFactory::createGlobalVariable ( const std::string &  suggested_name)

Creates a global variable. Registering the variable in AuboScope (by storing it in a DataModel instance or using it for the configuration of a built-in AuboScope program node) will make it accessible to all program nodes.

NOTE: Only use this method in a AuboCap program node (not relevant for an installation node).

Parameters
suggested_nameSuggested name of the variable. Valid names must match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters.
Returns
GlobalVariable.
Exceptions
VariableExceptionIn case of an illegal name.
GlobalVariablePtr arcs::aubo_scope::VariableFactory::createGlobalVariable ( const std::string &  suggested_name,
ExpressionPtr  initialValue 
)

Creates a global variable.

Registering the variable in AuboScope (by storing it in a DataModel instance or using it for the configuration of a built-in AuboScope program node) will make it accessible to all program nodes.

Setting an initial value will make it possible to read from the variable immediately without having to assign a value to it first. This can be useful in various constructs which requires an initial value, e.g. 'var_1 = var_1 + 1' or 'if (var_2 =):'.

NOTE: Only use this method in a AuboCap program node (not relevant for an installation node).

Parameters
suggested_nameSuggested name of the variable. Valid names must match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters.
initialValueThe expression that will be evaluated in order to initialize the value of the variable. This value is assigned before the actual program runs.
Returns
GlobalVariable.
Exceptions
VariableExceptionIn case of an illegal name.

Friends And Related Function Documentation

friend class DataSwitch
friend

Definition at line 112 of file variable_factory.h.

Member Data Documentation

void* arcs::aubo_scope::VariableFactory::d_ { nullptr }
private

Definition at line 114 of file variable_factory.h.


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