openPSTD  2.0
Open source simulation for sound propagation in urban environments
edit.h
1 // This file is part of openPSTD. //
3 // //
4 // openPSTD is free software: you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation, either version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // openPSTD is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with openPSTD. If not, see <http://www.gnu.org/licenses/>. //
16 // //
18 
20 //
21 // Date:
22 // 20-1-2016
23 //
24 // Authors:
25 // Michiel Fortuijn
26 // Louis van Harten
27 // Omar Richardson
28 //
29 // Purpose:
30 // Editing command from the command line.
31 //
33 
34 #ifndef OPENPSTD_EDIT_CLI_H
35 #define OPENPSTD_EDIT_CLI_H
36 
37 #include <boost/program_options.hpp>
38 #include <kernel/KernelInterface.h>
39 
40 namespace OpenPSTD
41 {
42  namespace CLI
43  {
44  namespace po = boost::program_options;
45 
46  struct CLIDomainAdd
47  {
48  public:
49  CLIDomainAdd()
50  : x1(0), y1(0), x2(0), y2(0)
51  { }
52  CLIDomainAdd(float x1, float y1, float x2, float y2)
53  : x1(x1), y1(y1), x2(x2), y2(y2)
54  { };
55  float x1, y1, x2, y2;
56  };
57 
59  {
60  public:
62  : id(-1), x1(0), y1(0), x2(0), y2(0)
63  { }
64 
65  CLIDomainChange(int id, float x1, float y1, float x2, float y2)
66  : id(id), x1(x1), y1(y1), x2(x2), y2(y2)
67  { };
68  int id;
69  float x1, y1, x2, y2;
70  };
71 
73  {
74  public:
75  int id;
76  char edge;
77  float value;
78 
80  : id(-1), edge('t'), value(0)
81  { }
82 
83  CLIEdgeAbsorption(int id, char edge, float value)
84  : id(id), edge(edge), value(value)
85  { }
86  };
87 
88  struct CLIEdgeLR
89  {
90  public:
91  int id;
92  char edge;
93  bool value;
94 
95  CLIEdgeLR()
96  : id(-1), edge('t'), value(true)
97  { }
98 
99  CLIEdgeLR(int id, char edge, float value)
100  : id(id), edge(edge), value(value)
101  { }
102  };
103 
105  {
106  public:
107  float x, y;
108 
110  : x(0), y(0)
111  { }
112 
113  CLISpeakerReceiverAdd(float x, float y)
114  : x(x), y(y)
115  { }
116  };
117 
119  {
120  public:
121  virtual void AddOptions(po::options_description_easy_init add_option) = 0;
122  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input) = 0;
123  };
124 
126  {
127  public:
128  virtual void AddOptions(po::options_description_easy_init add_option);
129  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
130  };
131 
133  {
134  private:
135  int delIndex;
136 
137  public:
138  virtual void AddOptions(po::options_description_easy_init add_option);
139  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
140  };
141 
143  {
144  public:
145  virtual void AddOptions(po::options_description_easy_init add_option);
146  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
147  };
148 
150  {
151  public:
152  virtual void AddOptions(po::options_description_easy_init add_option);
153  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
154  };
155 
157  {
158  public:
159  virtual void AddOptions(po::options_description_easy_init add_option);
160  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
161  };
162 
164  {
165  public:
166  virtual void AddOptions(po::options_description_easy_init add_option);
167  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
168  };
169 
171  {
172  private:
173  int delIndex;
174 
175  public:
176  virtual void AddOptions(po::options_description_easy_init add_option);
177  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
178  };
179 
181  {
182  public:
183  virtual void AddOptions(po::options_description_easy_init add_option);
184  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
185  };
186 
188  {
189  private:
190  int delIndex;
191 
192  public:
193  virtual void AddOptions(po::options_description_easy_init add_option);
194  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
195  };
196 
198  {
199  public:
200  virtual void AddOptions(po::options_description_easy_init add_option);
201  virtual void Execute(std::shared_ptr<Kernel::PSTDConfiguration> model, po::variables_map input);
202  };
203 
204 #endif //OPENPSTD_EDIT_CLI_H
205 
206  }
207 }
This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
Definition: edit.h:118
Definition: edit.h:58
Definition: edit.h:88
Definition: edit.h:46