PointingTable.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 PointingTable.h 00032 */ 00033 00034 #ifndef PointingTable_CLASS 00035 #define PointingTable_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 #ifndef WITHOUT_ACS 00070 #include <asdmIDLC.h> 00071 using asdmIDL::PointingTableIDL; 00072 #endif 00073 00074 using asdm::Angle; 00075 using asdm::AngularRate; 00076 using asdm::ArrayTime; 00077 using asdm::Complex; 00078 using asdm::Entity; 00079 using asdm::EntityId; 00080 using asdm::EntityRef; 00081 using asdm::Flux; 00082 using asdm::Frequency; 00083 using asdm::Humidity; 00084 using asdm::Interval; 00085 using asdm::Length; 00086 using asdm::PartId; 00087 using asdm::Pressure; 00088 using asdm::Speed; 00089 using asdm::Tag; 00090 using asdm::Temperature; 00091 00092 using asdm::DuplicateKey; 00093 using asdm::ConversionException; 00094 using asdm::NoSuchRow; 00095 using asdm::DuplicateKey; 00096 00097 #include <Representable.h> 00098 00099 namespace asdm { 00100 00101 //class asdm::ASDM; 00102 //class asdm::PointingRow; 00103 00104 class ASDM; 00105 class PointingRow; 00213 class PointingTable : public Representable { 00214 friend class asdm::ASDM; 00215 00216 public: 00217 00218 00224 static vector<string> getKeyName(); 00225 00226 00227 virtual ~PointingTable(); 00228 00234 ASDM &getContainer() const; 00235 00241 unsigned int size() ; 00242 00248 string getName() const; 00249 00253 Entity getEntity() const; 00254 00259 void setEntity(Entity e); 00260 00261 // 00262 // ====> Row creation. 00263 // 00264 00269 PointingRow *newRow(); 00270 00275 PointingRow* newRowEmpty(); 00276 00302 PointingRow *newRow(Tag antennaId, ArrayTimeInterval timeInterval, int pointingModelId, int numPoly, ArrayTime timeOrigin, vector<vector<Angle > > pointingDirection, vector<vector<Angle > > target, vector<vector<Angle > > offset, vector<Angle > encoder, bool pointingTracking); 00303 00308 PointingRow *newRowFull(Tag antennaId, ArrayTimeInterval timeInterval, int pointingModelId, int numPoly, ArrayTime timeOrigin, vector<vector<Angle > > pointingDirection, vector<vector<Angle > > target, vector<vector<Angle > > offset, vector<Angle > encoder, bool pointingTracking); 00309 00322 PointingRow *newRow(PointingRow *row); 00323 00328 PointingRow *newRowCopy(PointingRow *row); 00329 00330 // 00331 // ====> Append a row to its table. 00332 // 00333 00334 00351 PointingRow* add(PointingRow* x) ; 00352 00353 // 00354 // ====> Methods returning rows. 00355 // 00356 00362 vector<PointingRow *> get() ; 00363 00364 00372 vector <PointingRow*> *getByContext(Tag antennaId); 00373 00374 00375 00376 00377 00389 PointingRow* getRowByKey(Tag antennaId, ArrayTimeInterval timeInterval); 00390 00391 00392 #ifndef WITHOUT_ACS 00393 // Conversion Methods 00399 PointingTableIDL *toIDL() ; 00400 #endif 00401 00402 #ifndef WITHOUT_ACS 00403 00409 void fromIDL(PointingTableIDL x) throw(DuplicateKey,ConversionException); 00410 #endif 00411 00415 char *toFITS() const throw(ConversionException); 00416 00420 void fromFITS(char *fits) throw(ConversionException); 00421 00425 string toVOTable() const throw(ConversionException); 00426 00430 void fromVOTable(string vo) throw(ConversionException); 00431 00438 string toXML() throw(ConversionException); 00439 00447 void fromXML(string xmlDoc) throw(ConversionException); 00448 00454 string toMIME(); 00455 00462 void setFromMIME(const string & mimeMsg); 00463 00472 void toFile(string directory); 00473 00482 void setFromFile(const string& directory); 00483 00484 private: 00485 00494 PointingTable (ASDM & container); 00495 00496 ASDM & container; 00497 00498 bool archiveAsBin; // If true archive binary else archive XML 00499 bool fileAsBin ; // If true file binary else file XML 00500 00501 Entity entity; 00502 00503 00504 00508 static string tableName; 00509 00510 00514 static vector<string> key; 00515 00516 00522 PointingRow* checkAndAdd(PointingRow* x) throw (DuplicateKey); 00523 00524 00532 PointingRow * insertByStartTime(PointingRow* x, vector<PointingRow* >& row); 00533 00534 00535 // A data structure to store the pointers on the table's rows. 00536 00537 // In all cases we maintain a private ArrayList of PointingRow s. 00538 vector<PointingRow * > privateRows; 00539 00540 00541 00542 00543 00544 00545 00546 00547 typedef vector <PointingRow* > TIME_ROWS; 00548 map<string, TIME_ROWS > context; 00549 00554 string Key(Tag antennaId) ; 00555 00556 void error() throw(ConversionException); 00557 00558 }; 00559 00560 } // End namespace asdm 00561 00562 #endif /* PointingTable_CLASS */

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