General Purpose Geodetic Library
VpSetup.h
Go to the documentation of this file.
1 /*
2  * This file is a part of vgosDbProcLogs. vgosDbProcLogs is a part of
3  * CALC/SOLVE system and is designed to extract data, meteo parameters
4  * and cable calibrations, from stations log files and store them in
5  * the vgosDb 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 VP_SETUP_H
24 #define VP_SETUP_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QMap>
33 #include <QtCore/QString>
34 
35 
36 #include <SgIdentities.h>
37 
38 
39 /***===================================================================================================*/
45 class VpSetup
46 {
47 public:
48  //
49  // constructors/destructors:
50  //
53  VpSetup();
54 
58  virtual ~VpSetup();
59 
60 
61 
62  //
63  // Interfaces:
64  //
65  // gets:
68  inline const QString& getPath2Home() const;
69 
72  inline const QString& getPath2VgosDbFiles() const;
73 
76  inline const QString& getPath2SessionFiles() const;
77 
80  inline const QString& getPath2MasterFiles() const;
81 
84  inline const QString& getPath2AuxLogs() const;
85 
88  inline bool getHave2SavePerSessionLog() const;
89 
92  inline bool getUseLocalLocale() const {return useLocalLocale_;};
93 
96  inline const SgIdentities& getIdentities() const;
97 
100  inline SgIdentities& identities();
101 
102  inline const QMap<QString, int>& getDefaultCableSignByStn() const {return defaultCableSignByStn_;};
103 
104  inline const QMap<QString, QString>& getRinexFileNameByStn() const {return rinexFileNameByStn_;};
105 
106  inline const QMap<QString, double>& getRinexPressureOffsetByStn() const
107  {return rinexPressureOffsetByStn_;};
108 
109 
110  //
111  // sets:
114  inline void setPath2Home(const QString&);
115 
118  inline void setPath2VgosDbFiles(const QString&);
119 
122  inline void setPath2SessionFiles(const QString&);
123 
126  inline void setPath2MasterFiles(const QString&);
127 
130  inline void setPath2AuxLogs(const QString&);
131 
134  inline void setHave2SavePerSessionLog(bool);
135 
136  inline void setUseLocalLocale(bool use) {useLocalLocale_ = use;};
137 
140  inline void setIdentities(const SgIdentities&);
141 
142  inline QMap<QString, int>& defaultCableSignByStn() {return defaultCableSignByStn_;};
143 
144  inline QMap<QString, QString>& rinexFileNameByStn() {return rinexFileNameByStn_;};
145 
146  inline QMap<QString, double>& rinexPressureOffsetByStn() {return rinexPressureOffsetByStn_;};
147 
148 
149  //
150  // Functions:
151  //
152  inline QString className() const {return "VpSetup";};
153 
154  void setUpBinaryIdentities(const QString&);
155 
156  inline QString path2(const QString&) const;
157 
158 
159  void print2stdOut();
160 
161  //
162  // Friends:
163  //
164 
165 
166 
167  //
168  // I/O:
169  //
170  //
171 
172 
173 private:
174  // pathes:
175  QString path2Home_;
179  QString path2AuxLogs_;
182 
183  // identities:
185 
186  // default cable signs:
187  QMap<QString, int> defaultCableSignByStn_;
188  // RINEX files: GPS station names:
189  QMap<QString, QString> rinexFileNameByStn_;
190  // RINEX files: pressure corrections:
191  QMap<QString, double> rinexPressureOffsetByStn_;
192 };
193 /*=====================================================================================================*/
194 
195 
196 
197 
198 
199 /*=====================================================================================================*/
200 /* */
201 /* VpSetup inline members: */
202 /* */
203 /*=====================================================================================================*/
204 //
205 //
206 //
207 // INTERFACES:
208 //
209 //
210 inline const QString& VpSetup::getPath2Home() const
211 {
212  return path2Home_;
213 };
214 
215 
216 
217 //
218 inline const QString& VpSetup::getPath2VgosDbFiles() const
219 {
220  return path2VgosDbFiles_;
221 };
222 
223 
224 
225 //
226 inline const QString& VpSetup::getPath2SessionFiles() const
227 {
228  return path2SessionFiles_;
229 };
230 
231 
232 
233 //
234 inline const QString& VpSetup::getPath2MasterFiles() const
235 {
236  return path2MasterFiles_;
237 };
238 
239 
240 
241 //
242 inline const QString& VpSetup::getPath2AuxLogs() const
243 {
244  return path2AuxLogs_;
245 };
246 
247 
248 
249 //
251 {
253 };
254 
255 
256 
257 //
259 {
260  return identities_;
261 };
262 
263 
264 
265 //
267 {
268  return identities_;
269 };
270 
271 
272 
273 //
274 // sets:
275 //
276 inline void VpSetup::setPath2Home(const QString& str)
277 {
278  path2Home_ = str;
279 };
280 
281 
282 
283 //
284 inline void VpSetup::setPath2VgosDbFiles(const QString& str)
285 {
286  path2VgosDbFiles_ = str;
287 };
288 
289 
290 
291 //
292 inline void VpSetup::setPath2SessionFiles(const QString& str)
293 {
294  path2SessionFiles_ = str;
295 };
296 
297 
298 
299 //
300 inline void VpSetup::setPath2MasterFiles(const QString& str)
301 {
302  path2MasterFiles_ = str;
303 };
304 
305 
306 
307 //
308 inline void VpSetup::setPath2AuxLogs(const QString& str)
309 {
310  path2AuxLogs_ = str;
311 };
312 
313 
314 
315 //
316 inline void VpSetup::setHave2SavePerSessionLog(bool have2)
317 {
318  have2SavePerSessionLog_ = have2;
319 };
320 
321 
322 
323 //
324 inline void VpSetup::setIdentities(const SgIdentities& id)
325 {
326  identities_ = id;
327 };
328 
329 
330 
331 //
332 inline QString VpSetup::path2(const QString& path) const
333 {
334  return
335  path.size()==0 ? path2Home_ :
336  (path.at(0)==QChar('/') ? path : path2Home_ + "/" + path);
337 };
338 /*=====================================================================================================*/
339 #endif // VP_SETUP_H
void setPath2MasterFiles(const QString &)
Definition: VpSetup.h:300
SgIdentities & identities()
Definition: VpSetup.h:266
const QString & getPath2SessionFiles() const
Definition: VpSetup.h:226
bool useLocalLocale_
Definition: VpSetup.h:181
QString path2Home_
Definition: VpSetup.h:175
QString path2MasterFiles_
Definition: VpSetup.h:177
QMap< QString, QString > rinexFileNameByStn_
Definition: VpSetup.h:189
void setUpBinaryIdentities(const QString &)
Definition: VpSetup.cpp:77
const QString & getPath2VgosDbFiles() const
Definition: VpSetup.h:218
QString path2SessionFiles_
Definition: VpSetup.h:178
void setUseLocalLocale(bool use)
Definition: VpSetup.h:136
QMap< QString, double > & rinexPressureOffsetByStn()
Definition: VpSetup.h:146
QMap< QString, double > rinexPressureOffsetByStn_
Definition: VpSetup.h:191
void setPath2Home(const QString &)
Definition: VpSetup.h:276
QMap< QString, int > & defaultCableSignByStn()
Definition: VpSetup.h:142
QString className() const
Definition: VpSetup.h:152
void setPath2SessionFiles(const QString &)
Definition: VpSetup.h:292
const QString & getPath2Home() const
Definition: VpSetup.h:210
const QString & getPath2AuxLogs() const
Definition: VpSetup.h:242
bool getUseLocalLocale() const
Definition: VpSetup.h:92
const QString & getPath2MasterFiles() const
Definition: VpSetup.h:234
QString path2VgosDbFiles_
Definition: VpSetup.h:176
void print2stdOut()
Definition: VpSetup.cpp:89
SgIdentities identities_
Definition: VpSetup.h:184
void setPath2AuxLogs(const QString &)
Definition: VpSetup.h:308
QString path2AuxLogs_
Definition: VpSetup.h:179
QString path2(const QString &) const
Definition: VpSetup.h:332
void setHave2SavePerSessionLog(bool)
Definition: VpSetup.h:316
VpSetup()
Definition: VpSetup.cpp:46
QMap< QString, QString > & rinexFileNameByStn()
Definition: VpSetup.h:144
const QMap< QString, double > & getRinexPressureOffsetByStn() const
Definition: VpSetup.h:106
void setPath2VgosDbFiles(const QString &)
Definition: VpSetup.h:284
const QMap< QString, int > & getDefaultCableSignByStn() const
Definition: VpSetup.h:102
QMap< QString, int > defaultCableSignByStn_
Definition: VpSetup.h:187
void setIdentities(const SgIdentities &)
Definition: VpSetup.h:324
bool have2SavePerSessionLog_
Definition: VpSetup.h:180
const QMap< QString, QString > & getRinexFileNameByStn() const
Definition: VpSetup.h:104
bool getHave2SavePerSessionLog() const
Definition: VpSetup.h:250
virtual ~VpSetup()
Definition: VpSetup.cpp:70
const SgIdentities & getIdentities() const
Definition: VpSetup.h:258