CalFocusTable.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 CalFocusTable.h
00032  */
00033  
00034 #ifndef CalFocusTable_CLASS
00035 #define CalFocusTable_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 #include "CReceiverBand.h"
00087 using namespace ReceiverBandMod;
00088         
00089 
00090         
00091 
00092         
00093 
00094         
00095 #include "CFocusMethod.h"
00096 using namespace FocusMethodMod;
00097         
00098 
00099         
00100 
00101         
00102 
00103         
00104 
00105 
00106 #ifndef WITHOUT_ACS
00107 #include <asdmIDLC.h>
00108 using asdmIDL::CalFocusTableIDL;
00109 #endif
00110 
00111 using asdm::Angle;
00112 using asdm::AngularRate;
00113 using asdm::ArrayTime;
00114 using asdm::Complex;
00115 using asdm::Entity;
00116 using asdm::EntityId;
00117 using asdm::EntityRef;
00118 using asdm::Flux;
00119 using asdm::Frequency;
00120 using asdm::Humidity;
00121 using asdm::Interval;
00122 using asdm::Length;
00123 using asdm::PartId;
00124 using asdm::Pressure;
00125 using asdm::Speed;
00126 using asdm::Tag;
00127 using asdm::Temperature;
00128 
00129 using asdm::DuplicateKey;
00130 using asdm::ConversionException;
00131 using asdm::NoSuchRow;
00132 using asdm::DuplicateKey;
00133 
00134 #include <Representable.h>
00135 
00136 namespace asdm {
00137 
00138 //class asdm::ASDM;
00139 //class asdm::CalFocusRow;
00140 
00141 class ASDM;
00142 class CalFocusRow;
00246 class CalFocusTable : public Representable {
00247         friend class asdm::ASDM;
00248 
00249 public:
00250 
00251 
00257         static vector<string> getKeyName();
00258 
00259 
00260         virtual ~CalFocusTable();
00261         
00267         ASDM &getContainer() const;
00268         
00274         unsigned int size() ;
00275         
00281         string getName() const;
00282 
00286         Entity getEntity() const;
00287 
00292         void setEntity(Entity e);
00293 
00294         //
00295         // ====> Row creation.
00296         //
00297         
00302         CalFocusRow *newRow();
00303         
00308         CalFocusRow* newRowEmpty();
00309 
00310         
00342         CalFocusRow *newRow(Tag calDataId, Tag calReductionId, string antennaName, vector<Frequency > frequencyRange, ArrayTime startValidTime, ArrayTime endValidTime, ReceiverBand receiverBand, vector<Length > offset, vector<Length > error, FocusMethod focusMethod, vector<Angle > pointingDirection, vector<bool > wasFixed, Temperature ambientTemperature);
00343         
00348         CalFocusRow *newRowFull(Tag calDataId, Tag calReductionId, string antennaName, vector<Frequency > frequencyRange, ArrayTime startValidTime, ArrayTime endValidTime, ReceiverBand receiverBand, vector<Length > offset, vector<Length > error, FocusMethod focusMethod, vector<Angle > pointingDirection, vector<bool > wasFixed, Temperature ambientTemperature);
00349 
00350 
00363          CalFocusRow *newRow(CalFocusRow *row); 
00364 
00369          CalFocusRow *newRowCopy(CalFocusRow *row); 
00370 
00371         //
00372         // ====> Append a row to its table.
00373         //
00374  
00375         
00388         CalFocusRow* add(CalFocusRow* x) ; 
00389 
00390  
00391 
00392 
00393 
00394         //
00395         // ====> Methods returning rows.
00396         //
00397                 
00403         vector<CalFocusRow *> get() ;
00404         
00405 
00406 
00407  
00408         
00422         CalFocusRow* CalFocusTable::getRowByKey(Tag calDataId, Tag calReductionId, string antennaName);
00423 
00424                 
00425 
00426 
00427 
00461         CalFocusRow* lookup(Tag calDataId, Tag calReductionId, string antennaName, vector<Frequency > frequencyRange, ArrayTime startValidTime, ArrayTime endValidTime, ReceiverBand receiverBand, vector<Length > offset, vector<Length > error, FocusMethod focusMethod, vector<Angle > pointingDirection, vector<bool > wasFixed, Temperature ambientTemperature); 
00462 
00463 
00464 #ifndef WITHOUT_ACS
00465         // Conversion Methods
00471         CalFocusTableIDL *toIDL() ;
00472 #endif
00473 
00474 #ifndef WITHOUT_ACS
00475 
00481         void fromIDL(CalFocusTableIDL x) throw(DuplicateKey,ConversionException);
00482 #endif
00483 
00487         char *toFITS() const throw(ConversionException);
00488 
00492         void fromFITS(char *fits) throw(ConversionException);
00493 
00497         string toVOTable() const throw(ConversionException);
00498 
00502         void fromVOTable(string vo) throw(ConversionException);
00503 
00510         string toXML()  throw(ConversionException);
00511         
00517         void fromXML(string xmlDoc) throw(ConversionException);
00518         
00524         string toMIME();
00525         
00532          void setFromMIME(const string & mimeMsg);
00533         
00543           void toFile(string directory);
00544           
00553          void setFromFile(const string& directory);     
00554 
00555 private:
00556 
00565         CalFocusTable (ASDM & container);
00566 
00567         ASDM & container;
00568         
00569         bool archiveAsBin; // If true archive binary else archive XML
00570         bool fileAsBin ; // If true file binary else file XML   
00571         
00572         Entity entity;
00573         
00574 
00575 
00579         static string tableName;
00580 
00581 
00585         static vector<string> key;
00586 
00587 
00593         CalFocusRow* checkAndAdd(CalFocusRow* x) throw (DuplicateKey);
00594 
00595 
00596 
00597 // A data structure to store the pointers on the table's rows.
00598 
00599 // In all cases we maintain a private ArrayList of CalFocusRow s.
00600    vector<CalFocusRow * > privateRows;
00601    
00602 
00603                         
00604         vector<CalFocusRow *> row;
00605 
00606 
00607         void error() throw(ConversionException);
00608 
00609 };
00610 
00611 } // End namespace asdm
00612 
00613 #endif /* CalFocusTable_CLASS */

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