rem: void ECA_ENGINE::update_engine_state(void) {
add: void ECA_ENGINE::update_engine_state(void) {        if (inputs_not_finished_rep == 0 && outputs_finished_rep == 0 && finished_rep != true) { if (is_active() == true) { ecadebug->msg(ECA_DEBUG::system_objects,"(eca-engine) all inputs finished - stop"); request_stop(); } finished_rep = true; }
context: void ECA_ENGINE::update_engine_state(void) {    // --  // Updates engine status (if necessary).  if (inputs_not_finished_rep == 0) {    if (status() == ECA_ENGINE::engine_status_running) {      ecadebug->msg(ECA_DEBUG::system_objects,"(eca-engine) input not finished / stop");      stop();      if (outputs_finished_rep > 0)	set_status(ECA_ENGINE::engine_status_error);      else	set_status(ECA_ENGINE::engine_status_finished);    }  }  // --  // check whether processing has finished   if (status() == ECA_ENGINE::engine_status_finished ||      status() == ECA_ENGINE::engine_status_error) {    if (session_repp->iactive_rep != true) end_request_rep = true;  }  // --  // process the command queue  if (session_repp->iactive_rep == true) interpret_queue();  // --  // if in running state, poll for incoming commands  if (end_request_rep != true &&      session_repp->iactive_rep == true) {    if (status() != ECA_ENGINE::engine_status_running) {      impl_repp->command_queue_rep.poll(1, 0);      continue_request_rep = true;    }    else       continue_request_rep = false;  }}