General Purpose Geodetic Library
SgVlbiNetworkId.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_VLBI_NETWORK_ID_H
24 #define SG_VLBI_NETWORK_ID_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QList>
33 #include <QtCore/QString>
34 
35 
36 
37 class SgVlbiNetworkId;
39 extern const QString defaultNetIdName;
40 
41 /***===================================================================================================*/
47 class SgVlbiNetworkId : public QList<QString>
48 {
49 public:
50  // Statics:
53  static const QString className();
54 
55  //
56  // constructors/destructors:
57  //
61  inline SgVlbiNetworkId();
62 
66  inline SgVlbiNetworkId(const QString& name);
67 
71  inline SgVlbiNetworkId(const QString& name, const QList<QString>&);
72 
76  inline virtual ~SgVlbiNetworkId();
77 
78 
79  //
80  // Interfaces:
81  //
82  // gets:
83  inline const QString& getName() const;
84 
85 
86  // sets:
87  inline void setName(const QString&);
88 
89  // functions:
90  inline void addKey(const QString&);
91 
92  int countMatches(const QString&) const;
93 
94  //
95  // Friends:
96  //
97 
98  //
99  // I/O:
100  //
101  // ...
102 
103 private:
104  QString name_;
105 };
106 /*=====================================================================================================*/
107 
108 
109 
110 
111 
112 /*=====================================================================================================*/
113 /* */
114 /* SgObservation inline members: */
115 /* */
116 /*=====================================================================================================*/
117 //
118 //
119 // CONSTRUCTORS:
120 //
121 // An empty constructor:
123  name_("")
124 {
125 };
126 
127 
128 
129 //
130 inline SgVlbiNetworkId::SgVlbiNetworkId(const QString& name) :
131  QList<QString>(),
132  name_(name)
133 {
134 };
135 
136 
137 
138 inline SgVlbiNetworkId::SgVlbiNetworkId(const QString& name, const QList<QString>& lst) :
139  QList<QString>(),
140  name_(name)
141 {
142  for (int i=0; i<lst.size(); i++)
143  addKey(lst.at(i));
144 };
145 
146 
147 
148 
149 // A destructor:
151 {
152  // nothing to do
153 };
154 
155 
156 
157 //
158 inline const QString& SgVlbiNetworkId::getName() const
159 {
160  return name_;
161 };
162 
163 
164 
165 //
166 inline void SgVlbiNetworkId::setName(const QString& name)
167 {
168  name_ = name;
169 };
170 
171 
172 
173 //
174 inline void SgVlbiNetworkId::addKey(const QString& key)
175 {
176  append(key);
177 };
178 
179 
180 
181 
182 
183 //
184 // FRIENDS:
185 //
186 //
187 //
188 
189 
190 /*=====================================================================================================*/
191 
192 
193 
194 
195 
196 /*=====================================================================================================*/
197 //
198 // aux functions:
199 //
200 
201 /*=====================================================================================================*/
202 #endif // SG_VLBI_NETWORK_ID_H
QList< SgVlbiNetworkId > networks
const QString defaultNetIdName
const QString & getName() const
void setName(const QString &)
static const QString className()
void addKey(const QString &)
virtual ~SgVlbiNetworkId()
int countMatches(const QString &) const