CorrelatorModeTable.h

00001 00002 /* 00003 * ALMA - Atacama Large Millimeter Array 00004 * (c) European Southern Observatory, 2002 00005 * (c) Associated Universities Inc., 2002 00006 * Copyright by ESO (in the framework of the ALMA collaboration), 00007 * Copyright by AUI (in the framework of the ALMA collaboration), 00008 * All rights reserved. 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY, without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00023 * MA 02111-1307 USA 00024 * 00025 * Warning! 00026 * -------------------------------------------------------------------- 00027 * | This is generated code! Do not modify this file. | 00028 * | If you do, all changes will be lost when the file is re-generated. | 00029 * -------------------------------------------------------------------- 00030 * 00031 * File CorrelatorModeTable.h 00032 */ 00033 00034 #ifndef CorrelatorModeTable_CLASS 00035 #define CorrelatorModeTable_CLASS 00036 00037 #include <string> 00038 #include <vector> 00039 #include <map> 00040 #include <set> 00041 using std::string; 00042 using std::vector; 00043 using std::map; 00044 00045 #include <Angle.h> 00046 #include <AngularRate.h> 00047 #include <ArrayTime.h> 00048 #include <ArrayTimeInterval.h> 00049 #include <Complex.h> 00050 #include <Entity.h> 00051 #include <EntityId.h> 00052 #include <EntityRef.h> 00053 #include <Flux.h> 00054 #include <Frequency.h> 00055 #include <Humidity.h> 00056 #include <Interval.h> 00057 #include <Length.h> 00058 #include <PartId.h> 00059 #include <Pressure.h> 00060 #include <Speed.h> 00061 #include <Tag.h> 00062 #include <Temperature.h> 00063 #include <ConversionException.h> 00064 #include <DuplicateKey.h> 00065 #include <UniquenessViolationException.h> 00066 #include <NoSuchRow.h> 00067 #include <DuplicateKey.h> 00068 00069 /* 00070 #include <Enumerations.h> 00071 using namespace enumerations; 00072 */ 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 #include "CBasebandName.h" 00083 using namespace BasebandNameMod; 00084 00085 00086 00087 00088 00089 #include "CAccumMode.h" 00090 using namespace AccumModeMod; 00091 00092 00093 00094 00095 00096 #include "CAxisName.h" 00097 using namespace AxisNameMod; 00098 00099 00100 00101 #include "CFilterMode.h" 00102 using namespace FilterModeMod; 00103 00104 00105 00106 #include "CCorrelatorName.h" 00107 using namespace CorrelatorNameMod; 00108 00109 00110 00111 #ifndef WITHOUT_ACS 00112 #include <asdmIDLC.h> 00113 using asdmIDL::CorrelatorModeTableIDL; 00114 #endif 00115 00116 using asdm::Angle; 00117 using asdm::AngularRate; 00118 using asdm::ArrayTime; 00119 using asdm::Complex; 00120 using asdm::Entity; 00121 using asdm::EntityId; 00122 using asdm::EntityRef; 00123 using asdm::Flux; 00124 using asdm::Frequency; 00125 using asdm::Humidity; 00126 using asdm::Interval; 00127 using asdm::Length; 00128 using asdm::PartId; 00129 using asdm::Pressure; 00130 using asdm::Speed; 00131 using asdm::Tag; 00132 using asdm::Temperature; 00133 00134 using asdm::DuplicateKey; 00135 using asdm::ConversionException; 00136 using asdm::NoSuchRow; 00137 using asdm::DuplicateKey; 00138 00139 #include <Representable.h> 00140 00141 namespace asdm { 00142 00143 //class asdm::ASDM; 00144 //class asdm::CorrelatorModeRow; 00145 00146 class ASDM; 00147 class CorrelatorModeRow; 00223 class CorrelatorModeTable : public Representable { 00224 friend class asdm::ASDM; 00225 00226 public: 00227 00228 00234 static vector<string> getKeyName(); 00235 00236 00237 virtual ~CorrelatorModeTable(); 00238 00244 ASDM &getContainer() const; 00245 00251 unsigned int size() ; 00252 00258 string getName() const; 00259 00263 Entity getEntity() const; 00264 00269 void setEntity(Entity e); 00270 00271 // 00272 // ====> Row creation. 00273 // 00274 00279 CorrelatorModeRow *newRow(); 00280 00285 CorrelatorModeRow* newRowEmpty(); 00286 00287 00309 CorrelatorModeRow *newRow(int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode, int binMode, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName); 00310 00315 CorrelatorModeRow *newRowFull(int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode, int binMode, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName); 00316 00317 00330 CorrelatorModeRow *newRow(CorrelatorModeRow *row); 00331 00336 CorrelatorModeRow *newRowCopy(CorrelatorModeRow *row); 00337 00338 // 00339 // ====> Append a row to its table. 00340 // 00341 00342 00343 00344 00354 CorrelatorModeRow* add(CorrelatorModeRow* x) ; 00355 00356 00357 00358 // 00359 // ====> Methods returning rows. 00360 // 00361 00367 vector<CorrelatorModeRow *> get() ; 00368 00369 00370 00371 00372 00382 CorrelatorModeRow* getRowByKey(Tag almaCorrelatorModeId); 00383 00384 00385 00386 00387 00411 CorrelatorModeRow* lookup(int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode, int binMode, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName); 00412 00413 00414 #ifndef WITHOUT_ACS 00415 // Conversion Methods 00421 CorrelatorModeTableIDL *toIDL() ; 00422 #endif 00423 00424 #ifndef WITHOUT_ACS 00425 00431 void fromIDL(CorrelatorModeTableIDL x) throw(DuplicateKey,ConversionException); 00432 #endif 00433 00437 char *toFITS() const throw(ConversionException); 00438 00442 void fromFITS(char *fits) throw(ConversionException); 00443 00447 string toVOTable() const throw(ConversionException); 00448 00452 void fromVOTable(string vo) throw(ConversionException); 00453 00460 string toXML() throw(ConversionException); 00461 00467 void fromXML(string xmlDoc) throw(ConversionException); 00468 00474 string toMIME(); 00475 00482 void setFromMIME(const string & mimeMsg); 00483 00493 void toFile(string directory); 00494 00503 void setFromFile(const string& directory); 00504 00505 private: 00506 00515 CorrelatorModeTable (ASDM & container); 00516 00517 ASDM & container; 00518 00519 bool archiveAsBin; // If true archive binary else archive XML 00520 bool fileAsBin ; // If true file binary else file XML 00521 00522 Entity entity; 00523 00524 00525 // A map for the autoincrementation algorithm 00526 map<string,int> noAutoIncIds; 00527 void autoIncrement(string key, CorrelatorModeRow* x); 00528 00529 00533 static string tableName; 00534 00535 00539 static vector<string> key; 00540 00541 00547 CorrelatorModeRow* checkAndAdd(CorrelatorModeRow* x) throw (DuplicateKey, UniquenessViolationException); 00548 00549 00550 00551 // A data structure to store the pointers on the table's rows. 00552 00553 // In all cases we maintain a private ArrayList of CorrelatorModeRow s. 00554 vector<CorrelatorModeRow * > privateRows; 00555 00556 00557 00558 vector<CorrelatorModeRow *> row; 00559 00560 00561 void error() throw(ConversionException); 00562 00563 }; 00564 00565 } // End namespace asdm 00566 00567 #endif /* CorrelatorModeTable_CLASS */

Generated on Tue Nov 18 17:43:40 2008 for ASDM C++ Implementation by doxygen 1.3.8