coral
A C++ library for distributed co-simulation
Public Member Functions | List of all members
coral::model::VariableSetting Class Reference

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 an output variable.
 
 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 an output variable.
 
VariableID Variable () const CORAL_NOEXCEPT
 The variable ID.
 
bool HasValue () const CORAL_NOEXCEPT
 Whether the variable is to be given a value.
 
const ScalarValueValue () const
 The variable value, if any. More...
 
bool IsConnected () const CORAL_NOEXCEPT
 Whether the variable is to be connected.
 
const coral::model::VariableConnectedOutput () const
 The output to which the variable is to be connected, if any. More...
 

Detailed Description

An object which represents the action of assigning an initial value to a variable, or to connect it to another variable.

Member Function Documentation

const coral::model::Variable& coral::model::VariableSetting::ConnectedOutput ( ) const

The output to which the variable is to be connected, if any.

Precondition
IsConnected() == true
const ScalarValue& coral::model::VariableSetting::Value ( ) const

The variable value, if any.

Precondition
HasValue() == true

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