CalSeeingTable.h

Go to the documentation of this file.
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 CalSeeingTable.h
00032  */
00033  
00034 #ifndef CalSeeingTable_CLASS
00035 #define CalSeeingTable_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 
00046 
00047 #include <ArrayTime.h>
00048 using  asdm::ArrayTime;
00049 
00050 #include <Angle.h>
00051 using  asdm::Angle;
00052 
00053 #include <Interval.h>
00054 using  asdm::Interval;
00055 
00056 #include <Tag.h>
00057 using  asdm::Tag;
00058 
00059 #include <Length.h>
00060 using  asdm::Length;
00061 
00062 #include <Frequency.h>
00063 using  asdm::Frequency;
00064 
00065 
00066 
00067 
00068         
00069 #include "CAtmPhaseCorrection.h"
00070 using namespace AtmPhaseCorrectionMod;
00071         
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 
00099 #include <ConversionException.h>
00100 #include <DuplicateKey.h>
00101 #include <UniquenessViolationException.h>
00102 #include <NoSuchRow.h>
00103 #include <DuplicateKey.h>
00104 using asdm::DuplicateKey;
00105 using asdm::ConversionException;
00106 using asdm::NoSuchRow;
00107 using asdm::DuplicateKey;
00108 
00109 #ifndef WITHOUT_ACS
00110 #include <asdmIDLC.h>
00111 using asdmIDL::CalSeeingTableIDL;
00112 #endif
00113 
00114 #include <Representable.h>
00115 
00116 namespace asdm {
00117 
00118 //class asdm::ASDM;
00119 //class asdm::CalSeeingRow;
00120 
00121 class ASDM;
00122 class CalSeeingRow;
00261 class CalSeeingTable : public Representable {
00262         friend class ASDM;
00263 
00264 public:
00265 
00266 
00272         static vector<string> getKeyName();
00273 
00274 
00275         virtual ~CalSeeingTable();
00276         
00282         ASDM &getContainer() const;
00283         
00289         unsigned int size() ;
00290         
00296         string getName() const;
00297         
00303          static const vector<string>& getAttributesNames();
00304 
00308         Entity getEntity() const;
00309 
00314         void setEntity(Entity e);
00315                 
00323         string toXML()  ;
00324 
00325 #ifndef WITHOUT_ACS
00326         // Conversion Methods
00332         CalSeeingTableIDL *toIDL() ;
00333 #endif
00334 
00335 #ifndef WITHOUT_ACS
00336 
00342         void fromIDL(CalSeeingTableIDL x) ;
00343 #endif
00344         
00345         //
00346         // ====> Row creation.
00347         //
00348         
00353         CalSeeingRow *newRow();
00354         
00355         
00385         CalSeeingRow *newRow(AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Frequency > frequencyRange, Interval integrationTime, int numBaseLengths, vector<Length > baselineLengths, vector<Angle > phaseRMS, Angle seeing, Angle seeingError);
00386         
00387 
00388 
00401          CalSeeingRow *newRow(CalSeeingRow *row); 
00402 
00403         //
00404         // ====> Append a row to its table.
00405         //
00406  
00407         
00420         CalSeeingRow* add(CalSeeingRow* x) ; 
00421 
00422  
00423 
00424 
00425 
00426         //
00427         // ====> Methods returning rows.
00428         //
00429                 
00435         vector<CalSeeingRow *> get() ;
00436         
00437 
00438 
00439  
00440         
00454         CalSeeingRow* getRowByKey(AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId);
00455 
00456                 
00457 
00458 
00459 
00491         CalSeeingRow* lookup(AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Frequency > frequencyRange, Interval integrationTime, int numBaseLengths, vector<Length > baselineLengths, vector<Angle > phaseRMS, Angle seeing, Angle seeingError); 
00492 
00493 
00494 private:
00495 
00504         CalSeeingTable (ASDM & container);
00505 
00506         ASDM & container;
00507         
00508         bool archiveAsBin; // If true archive binary else archive XML
00509         bool fileAsBin ; // If true file binary else file XML   
00510         
00511         Entity entity;
00512         
00513 
00514 
00518         static string tableName;
00519         
00523         static const vector<string> attributesNames;
00524         
00528         static vector<string> initAttributesNames();
00529 
00530 
00534         static vector<string> key;
00535 
00536 
00544         CalSeeingRow* checkAndAdd(CalSeeingRow* x) ;
00545 
00546 
00547 
00548 // A data structure to store the pointers on the table's rows.
00549 
00550 // In all cases we maintain a private vector of CalSeeingRow s.
00551    vector<CalSeeingRow * > privateRows;
00552    
00553 
00554                         
00555         vector<CalSeeingRow *> row;
00556 
00557         
00558         void error() ; //throw(ConversionException);
00559 
00560         
00567         void fromXML(string xmlDoc) ;
00568                 
00573         void setFromMIMEFile(const string& directory);
00574         void setFromXMLFile(const string& directory);
00575         
00583         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00584   
00585         
00592          void setFromMIME(const string & mimeMsg);
00593         
00597         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00598         
00608           void toFile(string directory);
00609           
00618          void setFromFile(const string& directory);     
00619  
00620 };
00621 
00622 } // End namespace asdm
00623 
00624 #endif /* CalSeeingTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines