AuboCaps  0.6.0
arcs::aubo_scope::VariableModel Class Reference

Provides methods that returns the variables that currently are registered in the system. More...

#include <variable_model.h>

Public Member Functions

 VariableModel (VariableModel &f)
 
 VariableModel (VariableModel &&f)
 
 ~VariableModel ()
 
std::vector< VariablePtr > getAll ()
 
VariablePtr get (const std::string &name)
 
std::vector< VariablePtr > get (std::function< bool(VariablePtr)> filter=[](VariablePtr){return true;})
 Get a subset of all the variables registered in the system using a filter. More...
 
VariableFactoryPtr getVariableFactory ()
 
FeatureVariablePtr getFeatureVariable (FeaturePtr feature)
 Get the feature variable for a Feature. More...
 
std::string connectedTo (const std::string &receiver, const std::function< void(VariableModel *)> &slot)
 Register callback for changed. More...
 
void disconnectFrom (const std::string &receiver)
 

Private Member Functions

 VariableModel ()
 

Private Attributes

void * d_ { nullptr }
 

Friends

class DataSwitch
 

Detailed Description

Provides methods that returns the variables that currently are registered in the system.

A variable is registered if it has been stored in a DataModel instance or used for the configuration of a built-in AuboScope program node.

Definition at line 20 of file variable_model.h.

Constructor & Destructor Documentation

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

Member Function Documentation

std::string arcs::aubo_scope::VariableModel::connectedTo ( const std::string &  receiver,
const std::function< void(VariableModel *)> &  slot 
)

Register callback for changed.

Parameters
receiver
slot
void arcs::aubo_scope::VariableModel::disconnectFrom ( const std::string &  receiver)
VariablePtr arcs::aubo_scope::VariableModel::get ( const std::string &  name)
std::vector<VariablePtr> arcs::aubo_scope::VariableModel::get ( std::function< bool(VariablePtr)>  filter = [](VariablePtr){return true;})

Get a subset of all the variables registered in the system using a filter.

Parameters
filtersee VariableFilterFactory for examples.
Returns
the collection of Variables that are accepted by the filter.
std::vector<VariablePtr> arcs::aubo_scope::VariableModel::getAll ( )
Returns
the collection of all variables that currently are registered in the system.
FeatureVariablePtr arcs::aubo_scope::VariableModel::getFeatureVariable ( FeaturePtr  feature)

Get the feature variable for a Feature.

Parameters
featurethe feature with a variable.
Returns
the variable for the feature.
Exceptions
IllegalArgumentExceptionIf feature not is present in the installation or feature has no variable, see Feature#isVariable().
VariableFactoryPtr arcs::aubo_scope::VariableModel::getVariableFactory ( )
Returns
a VariableFactory to create variable objects.

Friends And Related Function Documentation

friend class DataSwitch
friend

Definition at line 76 of file variable_model.h.

Member Data Documentation

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

Definition at line 78 of file variable_model.h.


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