| 444 | |
| 445 | |
| 446 | static ssc_bool_t ssc_invoke_handler( ssc_module_t , ssc_handler_t , |
| 447 | int action_type, float f0, float , |
| 448 | const char *s0, const char *, |
| 449 | void *user_data ) |
| 450 | { |
| 451 | ISimulationHandler *hh = (ISimulationHandler*) user_data; |
| 452 | if (!hh) return 0; |
| 453 | |
| 454 | if (action_type == SSC_LOG) |
| 455 | { |
| 456 | switch( (int)f0 ) |
| 457 | { |
| 458 | case SSC_NOTICE: |
| 459 | hh->Notice( s0 ); |
| 460 | break; |
| 461 | case SSC_WARNING: |
| 462 | hh->Warn( s0 ); |
| 463 | break; |
| 464 | case SSC_ERROR: |
| 465 | hh->Error( s0 ); |
| 466 | break; |
| 467 | } |
| 468 | |
| 469 | return hh->IsCancelled() ? 0 : 1; |
| 470 | } |
| 471 | else if (action_type == SSC_UPDATE) |
| 472 | { |
| 473 | hh->Update( f0, s0 ); |
| 474 | return hh->IsCancelled() ? 0 : 1; |
| 475 | } |
| 476 | else |
| 477 | return 0; |
| 478 | } |
| 479 | |
| 480 | bool Simulation::InvokeSSC(bool silent, const wxString& fn) |
| 481 | { |
nothing calls this directly
no test coverage detected