General Purpose Geodetic Library
VmSetup.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of vgosDbMake. vgosDbMake is a part of CALC/SOLVE
4  * system and is designed to convert correlator output data into VgosDb
5  * format.
6  * Copyright (C) 2015-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef VM_SETUP_H
24 #define VM_SETUP_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QString>
33 
34 
35 #include <SgIdentities.h>
36 
37 
38 /***===================================================================================================*/
44 class VmSetup
45 {
46 public:
47  //
48  // constructors/destructors:
49  //
52  VmSetup();
53 
57  virtual ~VmSetup();
58 
59 
60 
61  //
62  // Interfaces:
63  //
64  // gets:
67  inline const QString& getPath2Home() const;
68 
71  inline const QString& getPath2VgosDbFiles() const;
72 
75  inline const QString& getPath2InputFiles() const;
76 
79  inline const QString& getPath2MasterFiles() const;
80 
83  inline const QString& getPath2AuxLogs() const;
84 
87  inline bool getHave2SavePerSessionLog() const;
88 
91  inline bool getUseLocalLocale() const {return useLocalLocale_;};
92 
95  inline const SgIdentities& getIdentities() const;
96 
99  inline SgIdentities& identities();
100 
101 
102  //
103  // sets:
106  inline void setPath2Home(const QString&);
107 
110  inline void setPath2VgosDbFiles(const QString&);
111 
114  inline void setPath2InputFiles(const QString&);
115 
118  inline void setPath2MasterFiles(const QString&);
119 
122  inline void setPath2AuxLogs(const QString&);
123 
126  inline void setHave2SavePerSessionLog(bool);
127 
128  inline void setUseLocalLocale(bool use) {useLocalLocale_ = use;};
129 
132  inline void setIdentities(const SgIdentities&);
133 
134 
135 
136  //
137  // Functions:
138  //
139  inline QString className() const {return "VmSetup";};
140 
141  void setUpBinaryIdentities(const QString&);
142 
143  inline QString path2(const QString&) const;
144 
145 
146  void print2stdOut();
147 
148  //
149  // Friends:
150  //
151 
152 
153 
154  //
155  // I/O:
156  //
157  //
158 
159 
160 private:
161  // pathes:
162  QString path2Home_;
166  QString path2AuxLogs_;
169 
170  // identities:
172 };
173 /*=====================================================================================================*/
174 
175 
176 
177 
178 
179 /*=====================================================================================================*/
180 /* */
181 /* VmSetup inline members: */
182 /* */
183 /*=====================================================================================================*/
184 //
185 //
186 //
187 // INTERFACES:
188 //
189 //
190 inline const QString& VmSetup::getPath2Home() const
191 {
192  return path2Home_;
193 };
194 
195 
196 
197 //
198 inline const QString& VmSetup::getPath2VgosDbFiles() const
199 {
200  return path2VgosDbFiles_;
201 };
202 
203 
204 
205 //
206 inline const QString& VmSetup::getPath2InputFiles() const
207 {
208  return path2InputFiles_;
209 };
210 
211 
212 
213 //
214 inline const QString& VmSetup::getPath2MasterFiles() const
215 {
216  return path2MasterFiles_;
217 };
218 
219 
220 
221 //
222 inline const QString& VmSetup::getPath2AuxLogs() const
223 {
224  return path2AuxLogs_;
225 };
226 
227 
228 
229 //
231 {
233 };
234 
235 
236 
237 //
239 {
240  return identities_;
241 };
242 
243 
244 
245 //
247 {
248  return identities_;
249 };
250 
251 
252 
253 //
254 // sets:
255 //
256 inline void VmSetup::setPath2Home(const QString& str)
257 {
258  path2Home_ = str;
259 };
260 
261 
262 
263 //
264 inline void VmSetup::setPath2VgosDbFiles(const QString& str)
265 {
266  path2VgosDbFiles_ = str;
267 };
268 
269 
270 
271 //
272 inline void VmSetup::setPath2InputFiles(const QString& str)
273 {
274  path2InputFiles_ = str;
275 };
276 
277 
278 
279 //
280 inline void VmSetup::setPath2MasterFiles(const QString& str)
281 {
282  path2MasterFiles_ = str;
283 };
284 
285 
286 
287 //
288 inline void VmSetup::setPath2AuxLogs(const QString& str)
289 {
290  path2AuxLogs_ = str;
291 };
292 
293 
294 
295 //
296 inline void VmSetup::setHave2SavePerSessionLog(bool have2)
297 {
298  have2SavePerSessionLog_ = have2;
299 }
300 
301 
302 
303 //
304 inline void VmSetup::setIdentities(const SgIdentities& id)
305 {
306  identities_ = id;
307 };
308 
309 
310 
311 //
312 inline QString VmSetup::path2(const QString& path) const
313 {
314  return
315  path.size()==0 ? path2Home_ :
316  (path.at(0)==QChar('/') ? path : path2Home_ + "/" + path);
317 };
318 /*=====================================================================================================*/
319 #endif // VM_SETUP_H
void setPath2VgosDbFiles(const QString &)
Definition: VmSetup.h:264
QString path2Home_
Definition: VmSetup.h:162
bool getUseLocalLocale() const
Definition: VmSetup.h:91
QString path2MasterFiles_
Definition: VmSetup.h:165
bool useLocalLocale_
Definition: VmSetup.h:168
SgIdentities identities_
Definition: VmSetup.h:171
const QString & getPath2InputFiles() const
Definition: VmSetup.h:206
QString path2InputFiles_
Definition: VmSetup.h:164
QString path2(const QString &) const
Definition: VmSetup.h:312
const QString & getPath2Home() const
Definition: VmSetup.h:190
QString className() const
Definition: VmSetup.h:139
void setIdentities(const SgIdentities &)
Definition: VmSetup.h:304
const SgIdentities & getIdentities() const
Definition: VmSetup.h:238
virtual ~VmSetup()
Definition: VmSetup.cpp:62
void setPath2Home(const QString &)
Definition: VmSetup.h:256
const QString & getPath2VgosDbFiles() const
Definition: VmSetup.h:198
SgIdentities & identities()
Definition: VmSetup.h:246
QString path2AuxLogs_
Definition: VmSetup.h:166
void setPath2MasterFiles(const QString &)
Definition: VmSetup.h:280
void setUpBinaryIdentities(const QString &)
Definition: VmSetup.cpp:69
void setPath2InputFiles(const QString &)
Definition: VmSetup.h:272
VmSetup()
Definition: VmSetup.cpp:46
void setUseLocalLocale(bool use)
Definition: VmSetup.h:128
const QString & getPath2AuxLogs() const
Definition: VmSetup.h:222
bool getHave2SavePerSessionLog() const
Definition: VmSetup.h:230
void setPath2AuxLogs(const QString &)
Definition: VmSetup.h:288
void setHave2SavePerSessionLog(bool)
Definition: VmSetup.h:296
const QString & getPath2MasterFiles() const
Definition: VmSetup.h:214
QString path2VgosDbFiles_
Definition: VmSetup.h:163
void print2stdOut()
Definition: VmSetup.cpp:81
bool have2SavePerSessionLog_
Definition: VmSetup.h:167