General Purpose Geodetic Library
SgMasterRecord.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-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 SG_MASTER_RECORD_H
24 #define SG_MASTER_RECORD_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <math.h>
33 
34 #include <QtCore/QString>
35 #include <QtCore/QList>
36 #include <QtCore/QMap>
37 
38 
39 
40 /***===================================================================================================*/
46 // typedefs:
47 //
48 //
50 {
51 public:
53  {
54  MFV_UNDEF = 0,
55  MFV_V01 = 1,
56  MFV_V02 = 2,
57  };
58  //
59  // Statics:
62  static const QString className();
63 
64  //
65  // constructors/destructors:
66  //
70  inline SgMasterRecord();
71 
75  inline ~SgMasterRecord();
76 
77 
78 
79  //
80  // Interfaces:
81  //
85 
86  inline bool isValid() const;
87 
88  inline const QString& getName() const;
89 
90  inline const QString& getType() const;
91 
92  inline const QString& getCode() const;
93 
94  inline const QString& getDate() const;
95 
96  inline const QString& getStations() const;
97 
98  inline const QString& getDbcCode() const;
99 
100  inline const QString& getScheduledBy() const;
101 
102  inline const QString& getCorrelatedBy() const;
103 
104  inline const QString& getSubmittedBy() const;
105 
106  inline MasterFileVersion mfVersion() const {return mfVersion_;};
107 
108 
109 
110  inline void setName(const QString& s);
111 
112  inline void setType(const QString& s);
113 
114  inline void setCode(const QString& s);
115 
116  inline void setDate(const QString& s);
117 
118  inline void setStations(const QString& s);
119 
120  inline void setDbcCode(const QString& s);
121 
122  inline void setScheduledBy(const QString& s);
123 
124  inline void setCorrelatedBy(const QString& s);
125 
126  inline void setSubmittedBy(const QString& s);
127 
128  //
129  // Functions:
130  //
131  bool lookupRecordByName(const QString& nickName, const QString& path);
132 
133  bool lookupRecordByCode(const QString& sessionCode, const QString& sYear, const QString& path);
134 
135  void parseString_v1(const QString&);
136 
137  void parseString_v2(const QString&);
138 
139  //
140  // Friends:
141  //
142 
143  //
144  // I/O:
145  //
146  // ...
147 
148 private:
149  bool isValid_;
150  // a masterfile record:
151  QString name_;
152  QString type_;
153  QString code_;
154  QString date_;
155  QString stations_;
156  QString dbcCode_;
157  QString scheduledBy_;
158  QString correlatedBy_;
159  QString submittedBy_;
161 
162 
163  bool findRecordByName(const QString& date, const QString& dbcCode, const QString& fileName);
164  bool findRecordByCode(const QString& sessionCode, const QString& fileName);
165 };
166 /*=====================================================================================================*/
167 
168 
169 
170 
171 
172 /*=====================================================================================================*/
173 /* */
174 /* SgObjectInfo inline members: */
175 /* */
176 /*=====================================================================================================*/
177 //
178 //
179 // CONSTRUCTORS:
180 //
181 // An empty constructor:
183  name_("NONE"),
184  type_(""),
185  code_("NONE"),
186  date_("FEB31"),
187  stations_("0 -0"),
188  dbcCode_("ZQ"),
189  scheduledBy_("UNESCO"),
190  correlatedBy_("UNESCO"),
191  submittedBy_("UNESCO")
192 {
193  isValid_ = false;
195 };
196 
197 
198 
199 // A destructor:
201 {
202 };
203 
204 
205 
206 //
207 // INTERFACES:
208 //
209 //
210 //
211 inline bool SgMasterRecord::isValid() const
212 {
213  return isValid_;
214 };
215 
216 
217 
218 //
219 inline const QString& SgMasterRecord::getName() const
220 {
221  return name_;
222 };
223 
224 
225 
226 //
227 inline const QString& SgMasterRecord::getType() const
228 {
229  return type_;
230 };
231 
232 
233 
234 //
235 inline const QString& SgMasterRecord::getCode() const
236 {
237  return code_;
238 };
239 
240 
241 
242 //
243 inline const QString& SgMasterRecord::getDate() const
244 {
245  return date_;
246 };
247 
248 
249 
250 //
251 inline const QString& SgMasterRecord::getStations() const
252 {
253  return stations_;
254 };
255 
256 
257 
258 //
259 inline const QString& SgMasterRecord::getDbcCode() const
260 {
261  return dbcCode_;
262 };
263 
264 
265 
266 //
267 inline const QString& SgMasterRecord::getScheduledBy() const
268 {
269  return scheduledBy_;
270 };
271 
272 
273 
274 //
275 inline const QString& SgMasterRecord::getCorrelatedBy() const
276 {
277  return correlatedBy_;
278 };
279 
280 
281 
282 //
283 inline const QString& SgMasterRecord::getSubmittedBy() const
284 {
285  return submittedBy_;
286 };
287 
288 
289 
290 //
291 inline void SgMasterRecord::setName(const QString& s)
292 {
293  name_ = s;
294 };
295 
296 
297 
298 //
299 inline void SgMasterRecord::setType(const QString& s)
300 {
301  type_ = s;
302 };
303 
304 
305 
306 //
307 inline void SgMasterRecord::setCode(const QString& s)
308 {
309  code_ = s;
310 };
311 
312 
313 
314 //
315 inline void SgMasterRecord::setDate(const QString& s)
316 {
317  date_ = s;
318 };
319 
320 
321 
322 //
323 inline void SgMasterRecord::setStations(const QString& s)
324 {
325  stations_ = s;
326 };
327 
328 
329 
330 //
331 inline void SgMasterRecord::setDbcCode(const QString& s)
332 {
333  dbcCode_ = s;
334 };
335 
336 
337 
338 //
339 inline void SgMasterRecord::setScheduledBy(const QString& s)
340 {
341  scheduledBy_ = s;
342 };
343 
344 
345 
346 //
347 inline void SgMasterRecord::setCorrelatedBy(const QString& s)
348 {
349  correlatedBy_ = s;
350 };
351 
352 
353 
354 //
355 inline void SgMasterRecord::setSubmittedBy(const QString& s)
356 {
357  submittedBy_ = s;
358 };
359 
360 
361 
362 //
363 
364 
365 
366 //
367 
368 
369 
370 //
371 
372 
373 
374 //
375 
376 
377 //
378 // FUNCTIONS:
379 //
380 //
381 //
382 
383 
384 
385 //
386 // FRIENDS:
387 //
388 //
389 //
390 
391 
392 /*=====================================================================================================*/
393 
394 
395 
396 
397 
398 /*=====================================================================================================*/
399 //
400 // aux functions:
401 //
402 
403 
404 /*=====================================================================================================*/
405 #endif //SG_MASTER_RECORD_H
void setType(const QString &s)
const QString & getCorrelatedBy() const
const QString & getDate() const
void setCorrelatedBy(const QString &s)
static const QString className()
bool lookupRecordByCode(const QString &sessionCode, const QString &sYear, const QString &path)
bool findRecordByCode(const QString &sessionCode, const QString &fileName)
void setName(const QString &s)
void setDbcCode(const QString &s)
bool isValid() const
void parseString_v1(const QString &)
const QString & getScheduledBy() const
const QString & getStations() const
const QString & getName() const
void parseString_v2(const QString &)
void setCode(const QString &s)
const QString & getType() const
QString scheduledBy_
QString correlatedBy_
const QString & getCode() const
SgMasterRecord & operator=(const SgMasterRecord &r)
bool findRecordByName(const QString &date, const QString &dbcCode, const QString &fileName)
const QString & getDbcCode() const
MasterFileVersion mfVersion_
QString submittedBy_
const QString & getSubmittedBy() const
void setDate(const QString &s)
bool lookupRecordByName(const QString &nickName, const QString &path)
void setSubmittedBy(const QString &s)
void setStations(const QString &s)
void setScheduledBy(const QString &s)
MasterFileVersion mfVersion() const