General Purpose Geodetic Library
SgTask.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_TASK_H
24 #define SG_TASK_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QString>
33 #include <QtCore/QList>
34 
35 
36 
37 #include <SgParametersDescriptor.h>
38 #include <SgTaskConfig.h>
39 #include <SgVlbiBaselineInfo.h>
40 #include <SgVlbiSessionInfo.h>
41 #include <SgVlbiSourceInfo.h>
42 #include <SgVlbiStationInfo.h>
43 
44 
45 
46 //class SgAttribute;
47 //class SgMJD;
48 //class SgVlbiSession;
49 
50 class SgVlbiSession;
51 
52 /***===================================================================================================*/
58 class SgTask
59 {
60 public:
61  //
62  // constructors/destructors:
63  //
67  inline SgTask(const QString&);
68 
72  ~SgTask();
73 
74 
75  //
76  // Interfaces:
77  //
80  inline const QString& getName() const;
81 
84  inline SgTaskConfig* config(); // direct access:
85 
88  inline SgParametersDescriptor* parameters(); // direct access:
89 
93 
97 
101 
104  inline SourcesByName& sourcesByName();
105 
108  inline void setName(const QString&);
109 
112  inline void setConfig(const SgTaskConfig&);
113 
116  inline void setParameters(const SgParametersDescriptor&);
117  //
118  // Functions:
119  //
122  static const QString className();
123 
128 
133 
134 
135  //
136  // Friends:
137  //
138 
139  //
140  // I/O:
141  //
142  // ...
143 
144 private:
145  // task name:
146  QString name_;
147  // config:
149  // parameters:
151  // maps, object-by-name:
156  // hashes:
157  // ...
158 };
159 /*=====================================================================================================*/
160 
161 
162 
163 
164 
165 
166 
167 
168 /*=====================================================================================================*/
169 /* */
170 /* SgTask inline members: */
171 /* */
172 /*=====================================================================================================*/
173 //
174 //
175 // CONSTRUCTORS:
176 //
177 // An empty constructor:
178 inline SgTask::SgTask(const QString& name) :
179  name_(name),
180  config_(),
181  parameters_(),
182  sessionsByName_(),
183  stationsByName_(),
184  baselinesByName_(),
185  sourcesByName_()
186 {
187 };
188 
189 
190 
191 //
192 // INTERFACES:
193 //
194 //
195 //
196 inline const QString& SgTask::getName() const
197 {
198  return name_;
199 };
200 
201 
202 
203 //
205 {
206  return &config_;
207 };
208 
209 
210 
212 {
213  return &parameters_;
214 };
215 
216 
217 
218 //
219 inline QMap<QString, SgVlbiSessionInfo*>& SgTask::sessionsByName()
220 {
221  return sessionsByName_;
222 };
223 
224 
225 
226 //
227 inline QMap<QString, SgVlbiStationInfo*>& SgTask::stationsByName()
228 {
229  return stationsByName_;
230 };
231 
232 
233 
234 //
235 inline QMap<QString, SgVlbiBaselineInfo*>& SgTask::baselinesByName()
236 {
237  return baselinesByName_;
238 };
239 
240 
241 
242 //
243 inline QMap<QString, SgVlbiSourceInfo*>& SgTask::sourcesByName()
244 {
245  return sourcesByName_;
246 };
247 
248 
249 
250 //
251 inline void SgTask::setName(const QString& name)
252 {
253  name_ = name;
254 };
255 
256 
257 
258 //
259 inline void SgTask::setConfig(const SgTaskConfig& cfg)
260 {
261  config_ = cfg;
262 };
263 
264 
265 
266 //
268 {
269  parameters_ = p;
270 };
271 
272 
273 //
274 // FRUNCTIONS:
275 //
276 //
277 //
278 
279 
280 
281 //
282 // FRIENDS:
283 //
284 //
285 //
286 /*=====================================================================================================*/
287 
288 
289 
290 
291 
292 /*=====================================================================================================*/
293 //
294 // aux functions:
295 //
296 
297 
298 /*=====================================================================================================*/
299 #endif //SG_TASK_H
QMap< QString, SgVlbiBaselineInfo * > BaselinesByName
QMap< QString, SgVlbiSessionInfo * > SessionInfosByName
QMap< QString, SgVlbiSourceInfo * > SourcesByName
QMap< QString, SgVlbiStationInfo * > StationsByName
Definition: SgTask.h:59
SgTaskConfig config_
Definition: SgTask.h:148
SgParametersDescriptor parameters_
Definition: SgTask.h:150
QString name_
Definition: SgTask.h:146
SgParametersDescriptor * parameters()
Definition: SgTask.h:211
SgTaskConfig * config()
Definition: SgTask.h:204
void removeSession(SgVlbiSessionInfo *, SgVlbiSession *)
Definition: SgTask.cpp:158
SgTask(const QString &)
Definition: SgTask.h:178
SourcesByName & sourcesByName()
Definition: SgTask.h:243
BaselinesByName baselinesByName_
Definition: SgTask.h:154
void setConfig(const SgTaskConfig &)
Definition: SgTask.h:259
StationsByName & stationsByName()
Definition: SgTask.h:227
void addSession(SgVlbiSessionInfo *, SgVlbiSession *)
Definition: SgTask.cpp:69
SourcesByName sourcesByName_
Definition: SgTask.h:155
SessionInfosByName & sessionsByName()
Definition: SgTask.h:219
static const QString className()
Definition: SgTask.cpp:38
StationsByName stationsByName_
Definition: SgTask.h:153
const QString & getName() const
Definition: SgTask.h:196
SessionInfosByName sessionsByName_
Definition: SgTask.h:152
void setName(const QString &)
Definition: SgTask.h:251
~SgTask()
Definition: SgTask.cpp:45
void setParameters(const SgParametersDescriptor &)
Definition: SgTask.h:267
BaselinesByName & baselinesByName()
Definition: SgTask.h:235