Logo Search packages:      
Sourcecode: ecasound version File versions  Download package

void ECA_CONTROL::connect_chainsetup ( struct eci_return_value retval ) [virtual]

Connects selected chainsetup

require: is_selected() == true is_valid() == true

ensure: is_connected() == true || (last_error().size() > 0 && no_errors != true)

Implements ECA_CONTROL_MAIN.

Definition at line 475 of file eca-control-objects.cpp.

References ECA_SESSION::connect_chainsetup(), connected_chainsetup(), disconnect_chainsetup(), is_connected(), is_selected(), and ECA_CHAINSETUP::is_valid().

Referenced by check_action_preconditions(), and edit_chainsetup().

{
  // --------
  DBC_REQUIRE(is_selected());
  DBC_REQUIRE(selected_chainsetup_repp != 0 && selected_chainsetup_repp->is_valid() == true);
  // --------

  bool no_errors = true;
  string errmsg;
  if (is_connected() == true) {
    disconnect_chainsetup();
  }
  try {
    session_repp->connect_chainsetup();
    ECA_LOG_MSG(ECA_LOGGER::subsystems, "Connected chainsetup: \"" + connected_chainsetup() + "\"");
  }
  catch(ECA_ERROR& e) {
    errmsg = e.error_message();
    no_errors = false;
  }
  if (is_connected() != true) {
    set_last_error(" Connecting chainsetup failed: \"" + errmsg + "\"");
    no_errors = false;
  }

  fill_command_retval(retval);

  // --------
  DBC_ENSURE(is_connected() || no_errors != true);
  // --------
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index