Skip to content
Snippets Groups Projects
Commit 5ef56349 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

createDomainSimulation: no need for pointers around models

parent e25dd09b
No related branches found
No related tags found
No related merge requests found
...@@ -28,19 +28,19 @@ namespace ...@@ -28,19 +28,19 @@ namespace
std::unique_ptr<Simulation> createDomainSimulation(const Simulation& origin) std::unique_ptr<Simulation> createDomainSimulation(const Simulation& origin)
{ {
// initializing necessary GUI // initializing necessary GUI
const std::unique_ptr<DocumentModel> documentModel(new DocumentModel); DocumentModel documentModel;
const std::unique_ptr<SampleModel> sampleModel(new SampleModel); SampleModel sampleModel;
const std::unique_ptr<InstrumentModel> instrumentModel(new InstrumentModel); InstrumentModel instrumentModel;
const std::unique_ptr<MaterialModel> materialModel(new MaterialModel); MaterialModel materialModel;
// populating GUI models from domain // populating GUI models from domain
GUIObjectBuilder::populateSampleModelFromSim(sampleModel.get(), materialModel.get(), origin); GUIObjectBuilder::populateSampleModelFromSim(&sampleModel, &materialModel, origin);
GUIObjectBuilder::populateInstrumentModel(instrumentModel.get(), origin); GUIObjectBuilder::populateInstrumentModel(&instrumentModel, origin);
GUIObjectBuilder::populateDocumentModel(documentModel.get(), origin); GUIObjectBuilder::populateDocumentModel(&documentModel, origin);
auto result = DomainSimulationBuilder::createSimulation(sampleModel->multiLayerItem(), auto result = DomainSimulationBuilder::createSimulation(sampleModel.multiLayerItem(),
instrumentModel->instrumentItem(), instrumentModel.instrumentItem(),
documentModel->simulationOptionsItem()); documentModel.simulationOptionsItem());
return result; return result;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment