VPTissue Reference Manual
BitmapFormat.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2016 Universiteit Antwerpen
3  *
4  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
5  * the European Commission - subsequent versions of the EUPL (the "Licence");
6  * You may not use this work except in compliance with the Licence.
7  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the Licence is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the Licence for the specific language governing
13  * permissions and limitations under the Licence.
14  */
20 #include "BitmapFormat.h"
21 #include "sim/Sim.h"
22 #include "sim/SimState.h"
23 
24 using namespace std;
25 using namespace SimPT_Sim;
27 
28 namespace SimPT_Shell {
29 
30 void BitmapFormat::Convert(const SimState& s)
31 {
32  auto sim = make_shared<Sim>();
33  sim->Initialize(s);
34  auto prefs = make_shared<BitmapGraphicsPreferences>();
35  prefs->Update({m_prefs->GetChild("viewers.bitmap_graphics")});
36  prefs->m_format = m_format;
37  BitmapGraphicsExporter::Export(sim, GeneratePath(s), true, prefs);
38 }
39 
40 } // namespace
STL namespace.
Namespace for SimPT shell package.
Definition: Client.cpp:50
Wrapper around workspace to have read and write access to merged (workspace + project) preferences...
Interface of bitmap graphics converter format.
Namespace for the core simulator.
Header for SimState.
Sim, the actual simulator.
Contains the state of the whole Simulator at a given simulation step.
Definition: SimState.h:33