VPTissue Reference Manual
VectorFormat.h
Go to the documentation of this file.
1 #ifndef SIMPT_SHELL_CONVERTER_VECTOR_FORMAT_H_INCLUDED
2 #define SIMPT_SHELL_CONVERTER_VECTOR_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 "IConverterFormat.h"
23 #include "TimeStepPostfixFormat.h"
24 
26 #include "sim/Sim.h"
27 
28 namespace SimPT_Shell {
29 
34 {
35 public:
36  using FileFormat = VectorGraphicsPreferences::Format;
37 
38  VectorFormat(FileFormat f) : m_format(f) {}
39 
40  virtual bool AppendTimeStepSuffix() const { return true; };
41 
42  virtual bool IsPostProcessFormat() const { return true; }
43 
44  virtual std::string GetExtension() const
45  {
46  switch (m_format) {
47  case FileFormat::Pdf:
48  return "pdf";
49  case FileFormat::Eps:
50  return "eps";
51  }
52  return std::string();
53  }
54 
55  virtual std::string GetName() const
56  {
57  switch (m_format) {
58  case FileFormat::Pdf:
59  return "PDF";
60  case FileFormat::Eps:
61  return "EPS";
62  }
63  return std::string();
64  }
65 
66  virtual void Convert(const SimPT_Sim::SimState& src);
67 
68 private:
69  FileFormat m_format;
70 };
71 
72 } // namespace
73 
74 #endif // end_of_include_guard
Interface of TimeStepPostfixFormat.
Namespace for SimPT shell package.
Definition: Client.cpp:50
Interface for IConverterFormat.
Sim, the actual simulator.
Contains the state of the whole Simulator at a given simulation step.
Definition: SimState.h:33
Vector graphics converter format specifications.
Definition: VectorFormat.h:33
Interface for VectorGraphicsExporter.
Manages time labels int file names.