VPTissue Reference Manual
FileConversion.h
Go to the documentation of this file.
1 #ifndef SIMPT_SHELL_FILE_CONVERSION_H_INCLUDED
2 #define SIMPT_SHELL_FILE_CONVERSION_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 "workspace/Project.h"
25 
26 #include <functional>
27 #include <vector>
28 #include <map>
29 #include <memory>
30 
31 namespace SimPT_Shell {
32 
37 public:
38  FileConversion(Ws::Project* project,
39  std::vector<int> timesteps,
40  std::shared_ptr<SimShell::Ws::MergedPreferences> prefs,
41  IConverterFormat* output_format,
42  std::string output_path,
43  std::string output_prefix);
44 
45  void Run(std::function<void(int)> progress_callback = std::function<void(int)>());
46 
47 private:
48  Ws::Project* m_project;
49  std::vector<int> m_timesteps;
50  std::shared_ptr<SimShell::Ws::MergedPreferences> m_preferences;
51  IConverterFormat* m_output_format;
52  std::string m_output_path;
53  std::string m_output_prefix;
54  std::map<int, std::shared_ptr<Ws::StartupFileBase>> m_step_to_file_map;
55 };
56 
57 } // namespace
58 
59 #endif // end-of-include-guard
Abstraction of project info on filesystem, as well as a maintainer of a work session.
Namespace for SimPT shell package.
Definition: Client.cpp:50
Interface for IConverterFormat.
Interface for file convenvereter formats.
Interface for MergedPreferences.
Manages file conversion operations specifications.