Represents a connection between two objects within a network. More...
Public Member Functions | |
const char * | source_path () const |
Retrieve the source model of this connection. | |
const char * | destination_path () const |
Retrieve the destination model of this connection. | |
bool | is_bi_directional () const |
Test whether or not this is a bi directional connection. | |
void | set_value (const std::string &name, const dsim_value &value) throw (dsim_type_mismatch_exception) |
Set a named value for this connection. | |
dsim_value | value (const std::string &name) |
Retrieve a connection value by name. |
Represents a connection between two objects within a network.
Within a network represented by a dsim_network object and created via dsim_model::create_managed_network(), connections between objects in the network are represented by dsim_connection. Each connection has a source and a destination and may be either unidirectional or bidirectional. Each connection may also have a number of values set at it, determined by the variables declared on the parent network.
const char * dsim_connection::destination_path | ( | ) | const |
Retrieve the destination model of this connection.
bool dsim_connection::is_bi_directional | ( | ) | const |
Test whether or not this is a bi directional connection.
void dsim_connection::set_value | ( | const std::string & | name, |
const dsim_value & | value | ||
) | throw (dsim_type_mismatch_exception) |
Set a named value for this connection.
The type of the value is checked against the expected type for the named variable in the connection's network. If a type mismatch occurs, a dsim_type_mismatch_exception is thrown.
name | The name of the variable for which a value should be set |
value | The value to store in the named variable |
const char * dsim_connection::source_path | ( | ) | const |
Retrieve the source model of this connection.
dsim_value dsim_connection::value | ( | const std::string & | name ) |
Retrieve a connection value by name.
name | The name of the variable to retrieve |