casa
$Rev:20696$
|
00001 00002 #ifndef TagType_CLASS 00003 #define TagType_CLASS 00004 #include <string> 00005 #include <map> 00006 #include <iostream> 00007 00008 using namespace std; 00009 00010 namespace asdm { 00014 class TagType { 00015 public: 00020 virtual string toString() const; 00021 00027 static const TagType* getTagType(string name); 00028 00032 static const TagType* NoType; 00033 00034 00035 00036 00037 00041 static const TagType* AlmaRadiometer ; 00042 00043 00044 00048 static const TagType* Annotation ; 00049 00050 00051 00055 static const TagType* Antenna ; 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00070 static const TagType* CalData ; 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00101 static const TagType* CalReduction ; 00102 00103 00104 00105 00106 00107 00108 00112 static const TagType* ConfigDescription ; 00113 00114 00115 00119 static const TagType* CorrelatorMode ; 00120 00121 00122 00126 static const TagType* DataDescription ; 00127 00128 00129 00130 00131 00135 static const TagType* Doppler ; 00136 00137 00138 00142 static const TagType* Ephemeris ; 00143 00144 00145 00149 static const TagType* ExecBlock ; 00150 00151 00152 00156 static const TagType* Feed ; 00157 00158 00159 00163 static const TagType* Field ; 00164 00165 00166 00170 static const TagType* Flag ; 00171 00172 00173 00174 00175 00176 00177 00181 static const TagType* FocusModel ; 00182 00183 00184 00185 00186 00187 00188 00189 00190 00194 static const TagType* Holography ; 00195 00196 00197 00201 static const TagType* Observation ; 00202 00203 00204 00205 00206 00210 static const TagType* PointingModel ; 00211 00212 00213 00217 static const TagType* Polarization ; 00218 00219 00220 00224 static const TagType* Processor ; 00225 00226 00227 00231 static const TagType* Receiver ; 00232 00233 00234 00238 static const TagType* SBSummary ; 00239 00240 00241 00245 static const TagType* Scale ; 00246 00247 00248 00249 00250 00251 00252 00256 static const TagType* Source ; 00257 00258 00259 00263 static const TagType* SpectralWindow ; 00264 00265 00266 00270 static const TagType* SquareLawDetector ; 00271 00272 00273 00277 static const TagType* State ; 00278 00279 00280 00284 static const TagType* Station ; 00285 00286 00287 00288 00289 00293 static const TagType* SwitchCycle ; 00294 00295 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 private: 00309 string name; 00310 static map<string,const TagType*> name2TagType; 00311 virtual ~TagType() {}; 00312 TagType(string name); 00313 00314 class TagTypeMgr { 00315 public: 00316 ~TagTypeMgr () { 00317 if (TagType::NoType) {delete TagType::NoType; TagType::NoType=0;} 00318 00319 00320 00321 00322 if (TagType:: AlmaRadiometer) { delete TagType::AlmaRadiometer; TagType::AlmaRadiometer = 0; } 00323 00324 00325 00326 if (TagType:: Annotation) { delete TagType::Annotation; TagType::Annotation = 0; } 00327 00328 00329 00330 if (TagType:: Antenna) { delete TagType::Antenna; TagType::Antenna = 0; } 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 if (TagType:: CalData) { delete TagType::CalData; TagType::CalData = 0; } 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 00363 00364 00365 00366 00367 00368 00369 00370 if (TagType:: CalReduction) { delete TagType::CalReduction; TagType::CalReduction = 0; } 00371 00372 00373 00374 00375 00376 00377 00378 if (TagType:: ConfigDescription) { delete TagType::ConfigDescription; TagType::ConfigDescription = 0; } 00379 00380 00381 00382 if (TagType:: CorrelatorMode) { delete TagType::CorrelatorMode; TagType::CorrelatorMode = 0; } 00383 00384 00385 00386 if (TagType:: DataDescription) { delete TagType::DataDescription; TagType::DataDescription = 0; } 00387 00388 00389 00390 00391 00392 if (TagType:: Doppler) { delete TagType::Doppler; TagType::Doppler = 0; } 00393 00394 00395 00396 if (TagType:: Ephemeris) { delete TagType::Ephemeris; TagType::Ephemeris = 0; } 00397 00398 00399 00400 if (TagType:: ExecBlock) { delete TagType::ExecBlock; TagType::ExecBlock = 0; } 00401 00402 00403 00404 if (TagType:: Feed) { delete TagType::Feed; TagType::Feed = 0; } 00405 00406 00407 00408 if (TagType:: Field) { delete TagType::Field; TagType::Field = 0; } 00409 00410 00411 00412 if (TagType:: Flag) { delete TagType::Flag; TagType::Flag = 0; } 00413 00414 00415 00416 00417 00418 00419 00420 if (TagType:: FocusModel) { delete TagType::FocusModel; TagType::FocusModel = 0; } 00421 00422 00423 00424 00425 00426 00427 00428 00429 00430 if (TagType:: Holography) { delete TagType::Holography; TagType::Holography = 0; } 00431 00432 00433 00434 if (TagType:: Observation) { delete TagType::Observation; TagType::Observation = 0; } 00435 00436 00437 00438 00439 00440 if (TagType:: PointingModel) { delete TagType::PointingModel; TagType::PointingModel = 0; } 00441 00442 00443 00444 if (TagType:: Polarization) { delete TagType::Polarization; TagType::Polarization = 0; } 00445 00446 00447 00448 if (TagType:: Processor) { delete TagType::Processor; TagType::Processor = 0; } 00449 00450 00451 00452 if (TagType:: Receiver) { delete TagType::Receiver; TagType::Receiver = 0; } 00453 00454 00455 00456 if (TagType:: SBSummary) { delete TagType::SBSummary; TagType::SBSummary = 0; } 00457 00458 00459 00460 if (TagType:: Scale) { delete TagType::Scale; TagType::Scale = 0; } 00461 00462 00463 00464 00465 00466 00467 00468 if (TagType:: Source) { delete TagType::Source; TagType::Source = 0; } 00469 00470 00471 00472 if (TagType:: SpectralWindow) { delete TagType::SpectralWindow; TagType::SpectralWindow = 0; } 00473 00474 00475 00476 if (TagType:: SquareLawDetector) { delete TagType::SquareLawDetector; TagType::SquareLawDetector = 0; } 00477 00478 00479 00480 if (TagType:: State) { delete TagType::State; TagType::State = 0; } 00481 00482 00483 00484 if (TagType:: Station) { delete TagType::Station; TagType::Station = 0; } 00485 00486 00487 00488 00489 00490 if (TagType:: SwitchCycle) { delete TagType::SwitchCycle; TagType::SwitchCycle = 0; } 00491 00492 00493 00494 00495 00496 00497 00498 00499 00500 00501 00502 00503 }; 00504 00505 TagTypeMgr() {}; 00506 00507 private : 00508 TagTypeMgr(const TagTypeMgr&); 00509 TagTypeMgr & operator=(const TagTypeMgr&); 00510 }; 00511 static TagTypeMgr tagTypeMgr; 00512 }; 00513 } // end namespace asdm 00514 #endif /* TagType_CLASS */