MCPcopy Create free account
hub / github.com/GollyGang/ready / OnConvertToFullKernel

Method OnConvertToFullKernel

src/gui/frame.cpp:3462–3483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3460// ---------------------------------------------------------------------
3461
3462void MyFrame::OnConvertToFullKernel(wxCommandEvent& event)
3463{
3464 unique_ptr<AbstractRD> sys;
3465 try
3466 {
3467 if(this->system->GetFileExtension()=="vti")
3468 {
3469 sys = make_unique<FullKernelOpenCLImageRD>(dynamic_cast<const OpenCLImageRD&>(*this->system));
3470 }
3471 else if(this->system->GetFileExtension()=="vtu")
3472 {
3473 sys = make_unique<FullKernelOpenCLMeshRD>(dynamic_cast<const OpenCLMeshRD&>(*this->system));
3474 }
3475 else wxMessageBox(_T("Internal error: unrecognised file extension"));
3476 }
3477 catch(const exception& e)
3478 {
3479 wxMessageBox(wxString::Format(_T("Error converting rule: %s"),e.what()));
3480 return;
3481 }
3482 this->SetCurrentRDSystem(move(sys));
3483}
3484
3485// ---------------------------------------------------------------------
3486

Callers

nothing calls this directly

Calls 2

SetCurrentRDSystemMethod · 0.95
GetFileExtensionMethod · 0.45

Tested by

no test coverage detected