| 481 | // -------------------------------------------------------------------------------------------------------------------- |
| 482 | |
| 483 | IPLerror CContext::createSimulator(IPLSimulationSettings* settings, |
| 484 | ISimulator** simulator) |
| 485 | { |
| 486 | if (!settings || !simulator) |
| 487 | return IPL_STATUS_FAILURE; |
| 488 | |
| 489 | try |
| 490 | { |
| 491 | auto _simulator = reinterpret_cast<CSimulator*>(gMemory().allocate(sizeof(CSimulator), Memory::kDefaultAlignment)); |
| 492 | new (_simulator) CSimulator(this, settings); |
| 493 | *simulator = _simulator; |
| 494 | } |
| 495 | catch (Exception e) |
| 496 | { |
| 497 | return static_cast<IPLerror>(e.status()); |
| 498 | } |
| 499 | |
| 500 | return IPL_STATUS_SUCCESS; |
| 501 | } |
| 502 | |
| 503 | } |
no test coverage detected