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:
52  // Statics:
55  static const QString className();
56 
57  //
58  // constructors/destructors:
59  //
63  inline SgMasterRecord();
64 
68  inline ~SgMasterRecord();
69 
70 
71 
72  //
73  // Interfaces:
74  //
78 
79  inline bool isValid() const;
80 
81  inline const QString& getName() const;
82 
83  inline const QString& getCode() const;
84 
85  inline const QString& getDate() const;
86 
87  inline const QString& getStations() const;
88 
89  inline const QString& getDbcCode() const;
90 
91  inline const QString& getScheduledBy() const;
92 
93  inline const QString& getCorrelatedBy() const;
94 
95  inline const QString& getSubmittedBy() const;
96 
97  inline void setName(const QString& s);
98 
99  inline void setCode(const QString& s);
100 
101  inline void setDate(const QString& s);
102 
103  inline void setStations(const QString& s);
104 
105  inline void setDbcCode(const QString& s);
106 
107  inline void setScheduledBy(const QString& s);
108 
109  inline void setCorrelatedBy(const QString& s);
110 
111  inline void setSubmittedBy(const QString& s);
112 
113  //
114  // Functions:
115  //
116  bool lookupRecordByName(const QString& nickName, const QString& path);
117 
118  bool lookupRecordByCode(const QString& sessionCode, const QString& sYear, const QString& path);
119 
120  void parseString(const QString&);
121 
122  //
123  // Friends:
124  //
125 
126  //
127  // I/O:
128  //
129  // ...
130 
131 private:
132  bool isValid_;
133  // a masterfile record:
134  QString name_;
135  QString code_;
136  QString date_;
137  QString stations_;
138  QString dbcCode_;
139  QString scheduledBy_;
140  QString correlatedBy_;
141  QString submittedBy_;
142 
143 
144  bool findRecordByName(const QString& date, const QString& dbcCode, const QString& fileName);
145  bool findRecordByCode(const QString& sessionCode, const QString& fileName);
146 };
147 /*=====================================================================================================*/
148 
149 
150 
151 
152 
153 /*=====================================================================================================*/
154 /* */
155 /* SgObjectInfo inline members: */
156 /* */
157 /*=====================================================================================================*/
158 //
159 //
160 // CONSTRUCTORS:
161 //
162 // An empty constructor:
164  name_("NONE"),
165  code_("NONE"),
166  date_("FEB31"),
167  stations_("0 -0"),
168  dbcCode_("ZQ"),
169  scheduledBy_("UNESCO"),
170  correlatedBy_("UNESCO"),
171  submittedBy_("UNESCO")
172 {
173  isValid_ = false;
174 };
175 
176 
177 
178 // A destructor:
180 {
181 };
182 
183 
184 
185 //
186 // INTERFACES:
187 //
188 //
189 //
190 inline bool SgMasterRecord::isValid() const
191 {
192  return isValid_;
193 };
194 
195 
196 
197 //
198 inline const QString& SgMasterRecord::getName() const
199 {
200  return name_;
201 };
202 
203 
204 
205 //
206 inline const QString& SgMasterRecord::getCode() const
207 {
208  return code_;
209 };
210 
211 
212 
213 //
214 inline const QString& SgMasterRecord::getDate() const
215 {
216  return date_;
217 };
218 
219 
220 
221 //
222 inline const QString& SgMasterRecord::getStations() const
223 {
224  return stations_;
225 };
226 
227 
228 
229 //
230 inline const QString& SgMasterRecord::getDbcCode() const
231 {
232  return dbcCode_;
233 };
234 
235 
236 
237 //
238 inline const QString& SgMasterRecord::getScheduledBy() const
239 {
240  return scheduledBy_;
241 };
242 
243 
244 
245 //
246 inline const QString& SgMasterRecord::getCorrelatedBy() const
247 {
248  return correlatedBy_;
249 };
250 
251 
252 
253 //
254 inline const QString& SgMasterRecord::getSubmittedBy() const
255 {
256  return submittedBy_;
257 };
258 
259 
260 
261 //
262 inline void SgMasterRecord::setName(const QString& s)
263 {
264  name_ = s;
265 };
266 
267 
268 
269 //
270 inline void SgMasterRecord::setCode(const QString& s)
271 {
272  code_ = s;
273 };
274 
275 
276 
277 //
278 inline void SgMasterRecord::setDate(const QString& s)
279 {
280  date_ = s;
281 };
282 
283 
284 
285 //
286 inline void SgMasterRecord::setStations(const QString& s)
287 {
288  stations_ = s;
289 };
290 
291 
292 
293 //
294 inline void SgMasterRecord::setDbcCode(const QString& s)
295 {
296  dbcCode_ = s;
297 };
298 
299 
300 
301 //
302 inline void SgMasterRecord::setScheduledBy(const QString& s)
303 {
304  scheduledBy_ = s;
305 };
306 
307 
308 
309 //
310 inline void SgMasterRecord::setCorrelatedBy(const QString& s)
311 {
312  correlatedBy_ = s;
313 };
314 
315 
316 
317 //
318 inline void SgMasterRecord::setSubmittedBy(const QString& s)
319 {
320  submittedBy_ = s;
321 };
322 
323 
324 
325 //
326 
327 
328 
329 //
330 
331 
332 
333 //
334 
335 
336 
337 //
338 
339 
340 //
341 // FUNCTIONS:
342 //
343 //
344 //
345 
346 
347 
348 //
349 // FRIENDS:
350 //
351 //
352 //
353 
354 
355 /*=====================================================================================================*/
356 
357 
358 
359 
360 
361 /*=====================================================================================================*/
362 //
363 // aux functions:
364 //
365 
366 
367 /*=====================================================================================================*/
368 #endif //SG_MASTER_RECORD_H
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
const QString & getScheduledBy() const
const QString & getStations() const
const QString & getName() const
void setCode(const QString &s)
QString scheduledBy_
QString correlatedBy_
const QString & getCode() const
SgMasterRecord & operator=(const SgMasterRecord &r)
void parseString(const QString &)
bool findRecordByName(const QString &date, const QString &dbcCode, const QString &fileName)
const QString & getDbcCode() const
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)