VPTissue Reference Manual
CliConverterTask.h
Go to the documentation of this file.
1 #ifndef CLI_CONVERTER_TASK_H_
2 #define CLI_CONVERTER_TASK_H_
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  */
23 
24 #include <iomanip>
25 #include <iostream>
26 #include <string>
27 
28 namespace SimPT_Shell {
29 
34 {
35 public:
37  CliConverterTask(const std::string& project, std::string timestep_filter,
38  IConverterFormat* output_format, std::string inputformat_filter="")
39  : m_project_name(project), m_timestep_filter(timestep_filter),
40  m_output_format(output_format), m_inputformat_filter(inputformat_filter)
41  {
42  }
43 
45  const std::string GetTimeStepFilter() const { return m_timestep_filter; }
46 
48  IConverterFormat* GetOutputFormat() const { return m_output_format; }
49 
51  const std::string GetProjectName() const {return m_project_name; }
52 
53 
55  const std::string GetInputFormatFilter() const {return m_inputformat_filter; }
56 
57 
58 
59 private:
60  std::string m_project_name;
61  std::string m_timestep_filter;
62  IConverterFormat* m_output_format;
63  std::string m_inputformat_filter;
64 
65 };
66 
67 inline
68 std::ostream& operator<<(std::ostream& os, const CliConverterTask& task)
69 {
70  os << "CliConverterTask: project = " << task.GetProjectName() << std::endl
71  << " timestep_filter = " << task.GetTimeStepFilter()
72  << ", output_format = " << task.GetOutputFormat()->GetName() << ", inputformat_filter="<<task.GetInputFormatFilter();
73 
74  return os;
75 }
76 
77 } // namespace
78 
79 #endif // include guard
A CliConverterTask represents an invocation of the converter from the command line.
Namespace for SimPT shell package.
Definition: Client.cpp:50
const std::string GetProjectName() const
Plain getter.
Interface for IConverterFormat.
Interface for file convenvereter formats.
const std::string GetTimeStepFilter() const
Plain getter.
const std::string GetInputFormatFilter() const
Plain getter.
CliConverterTask(const std::string &project, std::string timestep_filter, IConverterFormat *output_format, std::string inputformat_filter="")
Straight constructor.
IConverterFormat * GetOutputFormat() const
Plain getter.