coral
A C++ library for distributed co-simulation
|
An object which represents the action of assigning an initial value to a variable, or to connect it to another variable. More...
#include "coral/model.hpp"
Public Member Functions | |
VariableSetting (VariableID variable, const ScalarValue &value) | |
Indicates a variable which should be given a specific value. | |
VariableSetting (VariableID inputVar, const coral::model::Variable &outputVar) | |
Indicates an input variable which should be connected to, or disconnected from, an output variable. More... | |
VariableSetting (VariableID inputVar, const ScalarValue &value, const coral::model::Variable &outputVar) | |
Indicates an input variable which should both be given a specific value and connected to or disconnected from an output variable. More... | |
VariableID | Variable () const CORAL_NOEXCEPT |
The variable ID. | |
bool | HasValue () const CORAL_NOEXCEPT |
Whether the variable is to be given a value. | |
const ScalarValue & | Value () const |
The variable value, if any. More... | |
bool | IsConnectionChange () const CORAL_NOEXCEPT |
Whether this represents a variable connection change. | |
const coral::model::Variable & | ConnectedOutput () const |
The output to which the variable is to be connected, if any. More... | |
An object which represents the action of assigning an initial value to a variable, or to connect it to another variable.
coral::model::VariableSetting::VariableSetting | ( | VariableID | inputVar, |
const coral::model::Variable & | outputVar | ||
) |
Indicates an input variable which should be connected to, or disconnected from, an output variable.
If outputVar
is a default-constructed Variable
object (i.e., if outputVar.Empty()
is true
) this is equivalent to "no connection", meaning that an existing connection should be broken.
coral::model::VariableSetting::VariableSetting | ( | VariableID | inputVar, |
const ScalarValue & | value, | ||
const coral::model::Variable & | outputVar | ||
) |
Indicates an input variable which should both be given a specific value and connected to or disconnected from an output variable.
If outputVar
is a default-constructed Variable
object (i.e., if outputVar.Empty()
is true
) this is equivalent to "no connection", meaning that an existing connection should be broken.
const coral::model::Variable& coral::model::VariableSetting::ConnectedOutput | ( | ) | const |
The output to which the variable is to be connected, if any.
IsConnectionChange() == true
const ScalarValue& coral::model::VariableSetting::Value | ( | ) | const |
The variable value, if any.
HasValue() == true