PDF
AuboStudio SDK  0.6.3
arcs::aubo_scope::VariableModel Class Reference

VariableModel 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 ()
 Returns the collection of all variables that currently are registered in the system.
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.
VariableFactoryPtr getVariableFactory ()
 Returns a VariableFactory to create variable objects.
FeatureVariablePtr getFeatureVariable (FeaturePtr feature)
 Get the feature variable for a Feature.
std::string connectedTo (const std::string &receiver, const std::function< void(VariableModel *)> &slot)
 Register callback for changed.
void disconnectFrom (const std::string &receiver)
 Disconnect a callback.

Private Member Functions

 VariableModel ()

Private Attributes

void * d_ { nullptr }

Friends

class DataSwitch

Detailed Description

VariableModel 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 29 of file variable_model.h.

Constructor & Destructor Documentation

◆ VariableModel() [1/3]

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

References VariableModel().

Referenced by connectedTo(), VariableModel(), and VariableModel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VariableModel() [2/3]

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

References VariableModel().

Here is the call graph for this function:

◆ ~VariableModel()

arcs::aubo_scope::VariableModel::~VariableModel ( )

◆ VariableModel() [3/3]

arcs::aubo_scope::VariableModel::VariableModel ( )
private

Member Function Documentation

◆ connectedTo()

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

Register callback for changed.

Parameters
receiverthe receiver identifier.
slotthe callback function.
Returns
the connection identifier.

References VariableModel().

Here is the call graph for this function:

◆ disconnectFrom()

void arcs::aubo_scope::VariableModel::disconnectFrom ( const std::string & receiver)

Disconnect a callback.

Parameters
receiverthe receiver identifier.

◆ get() [1/2]

VariablePtr arcs::aubo_scope::VariableModel::get ( const std::string & name)

◆ get() [2/2]

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.

◆ getAll()

std::vector< VariablePtr > arcs::aubo_scope::VariableModel::getAll ( )

Returns the collection of all variables that currently are registered in the system.

Returns
the collection of all registered variables.

◆ getFeatureVariable()

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().

◆ getVariableFactory()

VariableFactoryPtr arcs::aubo_scope::VariableModel::getVariableFactory ( )

Returns a VariableFactory to create variable objects.

Returns
a VariableFactory to create variable objects.

◆ DataSwitch

friend class DataSwitch
friend

Definition at line 133 of file variable_model.h.

References DataSwitch.

Referenced by DataSwitch.

Member Data Documentation

◆ d_

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

Definition at line 135 of file variable_model.h.


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