libcosim icon indicating copy to clipboard operation
libcosim copied to clipboard

observer::variables_connected() is never called

Open eidekrist opened this issue 6 years ago • 0 comments

Before merge of #295, execution::add_observer(observer o) would call o->variables_connected() for all connected variables. Because a connection now is an object and no longer a one-to-one relationship between two variables, that call was omitted.

We should either:

  1. Change observer::variables_connected(output, input) to observer:.connection_added(std::shared_ptr<connection> conn) or
  2. When in doubt leave it out: Remove observer::variables_connected().

Since we have added execution::get_connections(), using an observer to register that a connection was added becomes less necessary.

The same goes for observer::variable_disconnected().

eidekrist avatar Jul 05 '19 08:07 eidekrist