VPTissue Reference Manual
ExporterFormat.h
Go to the documentation of this file.
1 #ifndef SIMPT_SHELL_CONVERTER_EXPORTER_FORMAT_H_INCLUDED
2 #define SIMPT_SHELL_CONVERTER_EXPORTER_FORMAT_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "TimeStepPostfixFormat.h"
23 #include "sim/Sim.h"
24 
25 namespace SimPT_Shell {
26 
30 template <class Exporter>
32 {
33 public:
34  virtual bool AppendTimeStepSuffix() const { return true; };
35 
36  virtual std::string GetExtension() const
37  {
38  return Exporter::GetFileExtension();
39  }
40 
41  virtual void Convert(const SimPT_Sim::SimState& s)
42  {
43  auto sim = std::make_shared<SimPT_Sim::Sim>();
44  sim->Initialize(s);
45  Exporter::Export(sim, GeneratePath(s), true);
46  }
47 };
48 
49 } // namespace
50 
51 #endif // end_of_include_guard
Utility template for generating exporter formats.
Interface of TimeStepPostfixFormat.
Namespace for SimPT shell package.
Definition: Client.cpp:50
Sim, the actual simulator.
Contains the state of the whole Simulator at a given simulation step.
Definition: SimState.h:33
Manages time labels int file names.