GainTrackingTable.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 GainTrackingTable.h
00032  */
00033  
00034 #ifndef GainTrackingTable_CLASS
00035 #define GainTrackingTable_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 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097 
00098 #ifndef WITHOUT_ACS
00099 #include <asdmIDLC.h>
00100 using asdmIDL::GainTrackingTableIDL;
00101 #endif
00102 
00103 using asdm::Angle;
00104 using asdm::AngularRate;
00105 using asdm::ArrayTime;
00106 using asdm::Complex;
00107 using asdm::Entity;
00108 using asdm::EntityId;
00109 using asdm::EntityRef;
00110 using asdm::Flux;
00111 using asdm::Frequency;
00112 using asdm::Humidity;
00113 using asdm::Interval;
00114 using asdm::Length;
00115 using asdm::PartId;
00116 using asdm::Pressure;
00117 using asdm::Speed;
00118 using asdm::Tag;
00119 using asdm::Temperature;
00120 
00121 using asdm::DuplicateKey;
00122 using asdm::ConversionException;
00123 using asdm::NoSuchRow;
00124 using asdm::DuplicateKey;
00125 
00126 #include <Representable.h>
00127 
00128 namespace asdm {
00129 
00130 //class asdm::ASDM;
00131 //class asdm::GainTrackingRow;
00132 
00133 class ASDM;
00134 class GainTrackingRow;
00243 class GainTrackingTable : public Representable {
00244         friend class asdm::ASDM;
00245 
00246 public:
00247 
00248 
00254         static vector<string> getKeyName();
00255 
00256 
00257         virtual ~GainTrackingTable();
00258         
00264         ASDM &getContainer() const;
00265         
00271         unsigned int size() ;
00272         
00278         string getName() const;
00279 
00283         Entity getEntity() const;
00284 
00289         void setEntity(Entity e);
00290 
00291         //
00292         // ====> Row creation.
00293         //
00294         
00299         GainTrackingRow *newRow();
00300         
00305         GainTrackingRow* newRowEmpty();
00306 
00307         
00335         GainTrackingRow *newRow(Tag antennaId, int feedId, Tag spectralWindowId, ArrayTimeInterval timeInterval, float attenuator, Interval delayoff1, Interval delayoff2, Angle phaseoff1, Angle phaseoff2, AngularRate rateoff1, AngularRate rateoff2);
00336         
00341         GainTrackingRow *newRowFull(Tag antennaId, int feedId, Tag spectralWindowId, ArrayTimeInterval timeInterval, float attenuator, Interval delayoff1, Interval delayoff2, Angle phaseoff1, Angle phaseoff2, AngularRate rateoff1, AngularRate rateoff2);
00342 
00343 
00356          GainTrackingRow *newRow(GainTrackingRow *row); 
00357 
00362          GainTrackingRow *newRowCopy(GainTrackingRow *row); 
00363 
00364         //
00365         // ====> Append a row to its table.
00366         //
00367  
00368         
00385         GainTrackingRow* add(GainTrackingRow* x) ; 
00386 
00387  
00388 
00389 
00390 
00391         //
00392         // ====> Methods returning rows.
00393         //
00394                 
00400         vector<GainTrackingRow *> get() ;
00401         
00402 
00410          vector <GainTrackingRow*> *getByContext(Tag antennaId, int feedId, Tag spectralWindowId);
00411          
00412 
00413 
00414  
00415         
00431         GainTrackingRow* GainTrackingTable::getRowByKey(Tag antennaId, int feedId, Tag spectralWindowId, ArrayTimeInterval timeInterval);
00432 
00433                 
00434 
00435 
00436 
00466         GainTrackingRow* lookup(Tag antennaId, int feedId, Tag spectralWindowId, ArrayTimeInterval timeInterval, float attenuator, Interval delayoff1, Interval delayoff2, Angle phaseoff1, Angle phaseoff2, AngularRate rateoff1, AngularRate rateoff2); 
00467 
00468 
00469 #ifndef WITHOUT_ACS
00470         // Conversion Methods
00476         GainTrackingTableIDL *toIDL() ;
00477 #endif
00478 
00479 #ifndef WITHOUT_ACS
00480 
00486         void fromIDL(GainTrackingTableIDL x) throw(DuplicateKey,ConversionException);
00487 #endif
00488 
00492         char *toFITS() const throw(ConversionException);
00493 
00497         void fromFITS(char *fits) throw(ConversionException);
00498 
00502         string toVOTable() const throw(ConversionException);
00503 
00507         void fromVOTable(string vo) throw(ConversionException);
00508 
00515         string toXML()  throw(ConversionException);
00516         
00522         void fromXML(string xmlDoc) throw(ConversionException);
00523         
00529         string toMIME();
00530         
00537          void setFromMIME(const string & mimeMsg);
00538         
00548           void toFile(string directory);
00549           
00558          void setFromFile(const string& directory);     
00559 
00560 private:
00561 
00570         GainTrackingTable (ASDM & container);
00571 
00572         ASDM & container;
00573         
00574         bool archiveAsBin; // If true archive binary else archive XML
00575         bool fileAsBin ; // If true file binary else file XML   
00576         
00577         Entity entity;
00578         
00579 
00580 
00584         static string tableName;
00585 
00586 
00590         static vector<string> key;
00591 
00592 
00598         GainTrackingRow* checkAndAdd(GainTrackingRow* x) throw (DuplicateKey);
00599 
00600 
00601         
00602         
00610          GainTrackingRow * insertByStartTime(GainTrackingRow* x, vector<GainTrackingRow* >& row);
00611           
00612 
00613 
00614 // A data structure to store the pointers on the table's rows.
00615 
00616 // In all cases we maintain a private ArrayList of GainTrackingRow s.
00617    vector<GainTrackingRow * > privateRows;
00618    
00619 
00620         
00621 
00622         
00623         
00624                 
00625                                 
00626         typedef vector <GainTrackingRow* > TIME_ROWS;
00627         map<string, TIME_ROWS > context;
00628                 
00633          string Key(Tag antennaId, int feedId, Tag spectralWindowId) ;
00634                  
00635                 
00636         
00637         
00643         void getByKeyNoAutoIncNoTime(vector <GainTrackingRow*>& vin, vector <GainTrackingRow*>& vout,  Tag antennaId, int feedId, Tag spectralWindowId);
00644         
00645 
00646 
00647         void error() throw(ConversionException);
00648 
00649 };
00650 
00651 } // End namespace asdm
00652 
00653 #endif /* GainTrackingTable_CLASS */

Generated on Thu Nov 29 16:46:46 2007 for ASDM C++ Implementation by  doxygen 1.5.1