AlmaRadiometerTable.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 AlmaRadiometerTable.h
00032  */
00033  
00034 #ifndef AlmaRadiometerTable_CLASS
00035 #define AlmaRadiometerTable_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 #ifndef WITHOUT_ACS
00083 #include <asdmIDLC.h>
00084 using asdmIDL::AlmaRadiometerTableIDL;
00085 #endif
00086 
00087 using asdm::Angle;
00088 using asdm::AngularRate;
00089 using asdm::ArrayTime;
00090 using asdm::Complex;
00091 using asdm::Entity;
00092 using asdm::EntityId;
00093 using asdm::EntityRef;
00094 using asdm::Flux;
00095 using asdm::Frequency;
00096 using asdm::Humidity;
00097 using asdm::Interval;
00098 using asdm::Length;
00099 using asdm::PartId;
00100 using asdm::Pressure;
00101 using asdm::Speed;
00102 using asdm::Tag;
00103 using asdm::Temperature;
00104 
00105 using asdm::DuplicateKey;
00106 using asdm::ConversionException;
00107 using asdm::NoSuchRow;
00108 using asdm::DuplicateKey;
00109 
00110 #include <Representable.h>
00111 
00112 namespace asdm {
00113 
00114 //class asdm::ASDM;
00115 //class asdm::AlmaRadiometerRow;
00116 
00117 class ASDM;
00118 class AlmaRadiometerRow;
00152 class AlmaRadiometerTable : public Representable {
00153         friend class asdm::ASDM;
00154 
00155 public:
00156 
00157 
00163         static vector<string> getKeyName();
00164 
00165 
00166         virtual ~AlmaRadiometerTable();
00167         
00173         ASDM &getContainer() const;
00174         
00180         unsigned int size() ;
00181         
00187         string getName() const;
00188 
00192         Entity getEntity() const;
00193 
00198         void setEntity(Entity e);
00199 
00200         //
00201         // ====> Row creation.
00202         //
00203         
00208         AlmaRadiometerRow *newRow();
00209         
00214         AlmaRadiometerRow* newRowEmpty();
00215 
00216         
00224         AlmaRadiometerRow *newRow(int numBand);
00225         
00230         AlmaRadiometerRow *newRowFull(int numBand);
00231 
00232 
00245          AlmaRadiometerRow *newRow(AlmaRadiometerRow *row); 
00246 
00251          AlmaRadiometerRow *newRowCopy(AlmaRadiometerRow *row); 
00252 
00253         //
00254         // ====> Append a row to its table.
00255         //
00256 
00257         
00258         
00259         
00269          AlmaRadiometerRow* add(AlmaRadiometerRow* x) ;
00270 
00271 
00272 
00273         //
00274         // ====> Methods returning rows.
00275         //
00276                 
00282         vector<AlmaRadiometerRow *> get() ;
00283         
00284 
00285 
00286  
00287         
00297         AlmaRadiometerRow* AlmaRadiometerTable::getRowByKey(Tag modeId);
00298 
00299                 
00300 
00301 
00302 
00312         AlmaRadiometerRow* lookup(int numBand); 
00313 
00314 
00315 #ifndef WITHOUT_ACS
00316         // Conversion Methods
00322         AlmaRadiometerTableIDL *toIDL() ;
00323 #endif
00324 
00325 #ifndef WITHOUT_ACS
00326 
00332         void fromIDL(AlmaRadiometerTableIDL x) throw(DuplicateKey,ConversionException);
00333 #endif
00334 
00338         char *toFITS() const throw(ConversionException);
00339 
00343         void fromFITS(char *fits) throw(ConversionException);
00344 
00348         string toVOTable() const throw(ConversionException);
00349 
00353         void fromVOTable(string vo) throw(ConversionException);
00354 
00361         string toXML()  throw(ConversionException);
00362         
00368         void fromXML(string xmlDoc) throw(ConversionException);
00369         
00375         string toMIME();
00376         
00383          void setFromMIME(const string & mimeMsg);
00384         
00394           void toFile(string directory);
00395           
00404          void setFromFile(const string& directory);     
00405 
00406 private:
00407 
00416         AlmaRadiometerTable (ASDM & container);
00417 
00418         ASDM & container;
00419         
00420         bool archiveAsBin; // If true archive binary else archive XML
00421         bool fileAsBin ; // If true file binary else file XML   
00422         
00423         Entity entity;
00424         
00425 
00426         // A map for the autoincrementation algorithm
00427         map<string,int>  noAutoIncIds;
00428         void autoIncrement(string key, AlmaRadiometerRow* x);
00429 
00430 
00434         static string tableName;
00435 
00436 
00440         static vector<string> key;
00441 
00442 
00448         AlmaRadiometerRow* checkAndAdd(AlmaRadiometerRow* x) throw (DuplicateKey, UniquenessViolationException);
00449 
00450 
00451 
00452 // A data structure to store the pointers on the table's rows.
00453 
00454 // In all cases we maintain a private ArrayList of AlmaRadiometerRow s.
00455    vector<AlmaRadiometerRow * > privateRows;
00456    
00457 
00458                         
00459         vector<AlmaRadiometerRow *> row;
00460 
00461 
00462         void error() throw(ConversionException);
00463 
00464 };
00465 
00466 } // End namespace asdm
00467 
00468 #endif /* AlmaRadiometerTable_CLASS */

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