VPTissue Reference Manual
VectorFormat.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 "VectorFormat.h"
21 
22 using namespace std;
23 using namespace SimPT_Sim;
25 
26 namespace SimPT_Shell {
27 
28 void VectorFormat::Convert(const SimState& s)
29 {
30  auto sim = make_shared<SimPT_Sim::Sim>();
31  sim->Initialize(s);
32  auto prefs = make_shared<VectorGraphicsPreferences>();
33  prefs->Update({m_prefs->GetChild("viewers.bitmap_graphics")});
34  prefs->m_format = m_format;
35  VectorGraphicsExporter::Export(sim, GeneratePath(s), true, prefs);
36 }
37 
38 } // 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...
Namespace for the core simulator.
Contains the state of the whole Simulator at a given simulation step.
Definition: SimState.h:33
Interface of vector graphics onverter format.