CalPointingTable.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 CalPointingTable.h
00032  */
00033  
00034 #ifndef CalPointingTable_CLASS
00035 #define CalPointingTable_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 #include "CReceiverBand.h"
00085 using namespace ReceiverBandMod;
00086         
00087 
00088         
00089 
00090         
00091 
00092         
00093 
00094         
00095 
00096         
00097 
00098         
00099 #include "CPointingMethod.h"
00100 using namespace PointingMethodMod;
00101         
00102 
00103         
00104 
00105         
00106 
00107         
00108 
00109         
00110 
00111         
00112 
00113         
00114 
00115         
00116 #include "CPointingModelMode.h"
00117 using namespace PointingModelModeMod;
00118         
00119 
00120         
00121 
00122         
00123 
00124         
00125 
00126         
00127 
00128 
00129 #ifndef WITHOUT_ACS
00130 #include <asdmIDLC.h>
00131 using asdmIDL::CalPointingTableIDL;
00132 #endif
00133 
00134 using asdm::Angle;
00135 using asdm::AngularRate;
00136 using asdm::ArrayTime;
00137 using asdm::Complex;
00138 using asdm::Entity;
00139 using asdm::EntityId;
00140 using asdm::EntityRef;
00141 using asdm::Flux;
00142 using asdm::Frequency;
00143 using asdm::Humidity;
00144 using asdm::Interval;
00145 using asdm::Length;
00146 using asdm::PartId;
00147 using asdm::Pressure;
00148 using asdm::Speed;
00149 using asdm::Tag;
00150 using asdm::Temperature;
00151 
00152 using asdm::DuplicateKey;
00153 using asdm::ConversionException;
00154 using asdm::NoSuchRow;
00155 using asdm::DuplicateKey;
00156 
00157 #include <Representable.h>
00158 
00159 namespace asdm {
00160 
00161 //class asdm::ASDM;
00162 //class asdm::CalPointingRow;
00163 
00164 class ASDM;
00165 class CalPointingRow;
00332 class CalPointingTable : public Representable {
00333         friend class asdm::ASDM;
00334 
00335 public:
00336 
00337 
00343         static vector<string> getKeyName();
00344 
00345 
00346         virtual ~CalPointingTable();
00347         
00353         ASDM &getContainer() const;
00354         
00360         unsigned int size() ;
00361         
00367         string getName() const;
00368 
00372         Entity getEntity() const;
00373 
00378         void setEntity(Entity e);
00379 
00380         //
00381         // ====> Row creation.
00382         //
00383         
00388         CalPointingRow *newRow();
00389         
00394         CalPointingRow* newRowEmpty();
00395 
00396         
00430         CalPointingRow *newRow(Tag calDataId, Tag calReductionId, string antennaName, ArrayTime startValidTime, ArrayTime endValidTime, ReceiverBand receiverBand, vector<Frequency > frequencyRange, vector<Angle > direction, vector<Angle > collOffsetRelative, vector<Angle > collOffsetAbsolute, vector<Angle > collError, PointingMethod pointingMethod, PointingModelMode mode, Temperature ambientTemperature);
00431         
00436         CalPointingRow *newRowFull(Tag calDataId, Tag calReductionId, string antennaName, ArrayTime startValidTime, ArrayTime endValidTime, ReceiverBand receiverBand, vector<Frequency > frequencyRange, vector<Angle > direction, vector<Angle > collOffsetRelative, vector<Angle > collOffsetAbsolute, vector<Angle > collError, PointingMethod pointingMethod, PointingModelMode mode, Temperature ambientTemperature);
00437 
00438 
00451          CalPointingRow *newRow(CalPointingRow *row); 
00452 
00457          CalPointingRow *newRowCopy(CalPointingRow *row); 
00458 
00459         //
00460         // ====> Append a row to its table.
00461         //
00462  
00463         
00476         CalPointingRow* add(CalPointingRow* x) ; 
00477 
00478  
00479 
00480 
00481 
00482         //
00483         // ====> Methods returning rows.
00484         //
00485                 
00491         vector<CalPointingRow *> get() ;
00492         
00493 
00494 
00495  
00496         
00510         CalPointingRow* CalPointingTable::getRowByKey(Tag calDataId, Tag calReductionId, string antennaName);
00511 
00512                 
00513 
00514 
00515 
00551         CalPointingRow* lookup(Tag calDataId, Tag calReductionId, string antennaName, ArrayTime startValidTime, ArrayTime endValidTime, ReceiverBand receiverBand, vector<Frequency > frequencyRange, vector<Angle > direction, vector<Angle > collOffsetRelative, vector<Angle > collOffsetAbsolute, vector<Angle > collError, PointingMethod pointingMethod, PointingModelMode mode, Temperature ambientTemperature); 
00552 
00553 
00554 #ifndef WITHOUT_ACS
00555         // Conversion Methods
00561         CalPointingTableIDL *toIDL() ;
00562 #endif
00563 
00564 #ifndef WITHOUT_ACS
00565 
00571         void fromIDL(CalPointingTableIDL x) throw(DuplicateKey,ConversionException);
00572 #endif
00573 
00577         char *toFITS() const throw(ConversionException);
00578 
00582         void fromFITS(char *fits) throw(ConversionException);
00583 
00587         string toVOTable() const throw(ConversionException);
00588 
00592         void fromVOTable(string vo) throw(ConversionException);
00593 
00600         string toXML()  throw(ConversionException);
00601         
00607         void fromXML(string xmlDoc) throw(ConversionException);
00608         
00614         string toMIME();
00615         
00622          void setFromMIME(const string & mimeMsg);
00623         
00633           void toFile(string directory);
00634           
00643          void setFromFile(const string& directory);     
00644 
00645 private:
00646 
00655         CalPointingTable (ASDM & container);
00656 
00657         ASDM & container;
00658         
00659         bool archiveAsBin; // If true archive binary else archive XML
00660         bool fileAsBin ; // If true file binary else file XML   
00661         
00662         Entity entity;
00663         
00664 
00665 
00669         static string tableName;
00670 
00671 
00675         static vector<string> key;
00676 
00677 
00683         CalPointingRow* checkAndAdd(CalPointingRow* x) throw (DuplicateKey);
00684 
00685 
00686 
00687 // A data structure to store the pointers on the table's rows.
00688 
00689 // In all cases we maintain a private ArrayList of CalPointingRow s.
00690    vector<CalPointingRow * > privateRows;
00691    
00692 
00693                         
00694         vector<CalPointingRow *> row;
00695 
00696 
00697         void error() throw(ConversionException);
00698 
00699 };
00700 
00701 } // End namespace asdm
00702 
00703 #endif /* CalPointingTable_CLASS */

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