casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalDeviceRow.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 CalDeviceRow.h
00032  */
00033  
00034 #ifndef CalDeviceRow_CLASS
00035 #define CalDeviceRow_CLASS
00036 
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044 
00045 
00046 
00047 
00048 
00049 
00050          
00051 #include <Tag.h>
00052         
00053 
00054          
00055 #include <Temperature.h>
00056         
00057 
00058          
00059 #include <ArrayTimeInterval.h>
00060         
00061 
00062 
00063 
00064 
00065         
00066 
00067         
00068 
00069         
00070 #include "CCalibrationDevice.h"
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083 
00084 
00085 #include <ConversionException.h>
00086 #include <NoSuchRow.h>
00087 #include <IllegalAccessException.h>
00088 
00089 #include <RowTransformer.h>
00090 //#include <TableStreamReader.h>
00091 
00092 /*\file CalDevice.h
00093     \brief Generated from model's revision "1.61", branch "HEAD"
00094 */
00095 
00096 namespace asdm {
00097 
00098 //class asdm::CalDeviceTable;
00099 
00100 
00101 // class asdm::AntennaRow;
00102 class AntennaRow;
00103 
00104 // class asdm::SpectralWindowRow;
00105 class SpectralWindowRow;
00106 
00107 // class asdm::FeedRow;
00108 class FeedRow;
00109         
00110 
00111 class CalDeviceRow;
00112 typedef void (CalDeviceRow::*CalDeviceAttributeFromBin) (EndianIStream& eis);
00113 typedef void (CalDeviceRow::*CalDeviceAttributeFromText) (const string& s);
00114 
00121 class CalDeviceRow {
00122 friend class asdm::CalDeviceTable;
00123 friend class asdm::RowTransformer<CalDeviceRow>;
00124 //friend class asdm::TableStreamReader<CalDeviceTable, CalDeviceRow>;
00125 
00126 public:
00127 
00128         virtual ~CalDeviceRow();
00129 
00133         CalDeviceTable &getTable() const;
00134         
00139         bool isAdded() const;
00140                 
00142         // Intrinsic Table Attributes //
00144         
00145         
00146         // ===> Attribute timeInterval
00147         
00148         
00149         
00150 
00151         
00156         ArrayTimeInterval getTimeInterval() const;
00157         
00158  
00159         
00160         
00170         void setTimeInterval (ArrayTimeInterval timeInterval);
00171                 
00172         
00173         
00174         
00175 
00176 
00177         
00178         // ===> Attribute numCalload
00179         
00180         
00181         
00182 
00183         
00188         int getNumCalload() const;
00189         
00190  
00191         
00192         
00200         void setNumCalload (int numCalload);
00201                 
00202         
00203         
00204         
00205 
00206 
00207         
00208         // ===> Attribute calLoadNames
00209         
00210         
00211         
00212 
00213         
00218         vector<CalibrationDeviceMod::CalibrationDevice > getCalLoadNames() const;
00219         
00220  
00221         
00222         
00230         void setCalLoadNames (vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
00231                 
00232         
00233         
00234         
00235 
00236 
00237         
00238         // ===> Attribute numReceptor, which is optional
00239         
00240         
00241         
00246         bool isNumReceptorExists() const;
00247         
00248 
00249         
00255         int getNumReceptor() const;
00256         
00257  
00258         
00259         
00266         void setNumReceptor (int numReceptor);
00267                 
00268         
00269         
00270         
00274         void clearNumReceptor ();
00275         
00276 
00277 
00278         
00279         // ===> Attribute calEff, which is optional
00280         
00281         
00282         
00287         bool isCalEffExists() const;
00288         
00289 
00290         
00296         vector<vector<float > > getCalEff() const;
00297         
00298  
00299         
00300         
00307         void setCalEff (vector<vector<float > > calEff);
00308                 
00309         
00310         
00311         
00315         void clearCalEff ();
00316         
00317 
00318 
00319         
00320         // ===> Attribute noiseCal, which is optional
00321         
00322         
00323         
00328         bool isNoiseCalExists() const;
00329         
00330 
00331         
00337         vector<double > getNoiseCal() const;
00338         
00339  
00340         
00341         
00348         void setNoiseCal (vector<double > noiseCal);
00349                 
00350         
00351         
00352         
00356         void clearNoiseCal ();
00357         
00358 
00359 
00360         
00361         // ===> Attribute coupledNoiseCal, which is optional
00362         
00363         
00364         
00369         bool isCoupledNoiseCalExists() const;
00370         
00371 
00372         
00378         vector<vector<float > > getCoupledNoiseCal() const;
00379         
00380  
00381         
00382         
00389         void setCoupledNoiseCal (vector<vector<float > > coupledNoiseCal);
00390                 
00391         
00392         
00393         
00397         void clearCoupledNoiseCal ();
00398         
00399 
00400 
00401         
00402         // ===> Attribute temperatureLoad, which is optional
00403         
00404         
00405         
00410         bool isTemperatureLoadExists() const;
00411         
00412 
00413         
00419         vector<Temperature > getTemperatureLoad() const;
00420         
00421  
00422         
00423         
00430         void setTemperatureLoad (vector<Temperature > temperatureLoad);
00431                 
00432         
00433         
00434         
00438         void clearTemperatureLoad ();
00439         
00440 
00441 
00443         // Extrinsic Table Attributes //
00445         
00446         
00447         // ===> Attribute antennaId
00448         
00449         
00450         
00451 
00452         
00457         Tag getAntennaId() const;
00458         
00459  
00460         
00461         
00471         void setAntennaId (Tag antennaId);
00472                 
00473         
00474         
00475         
00476 
00477 
00478         
00479         // ===> Attribute feedId
00480         
00481         
00482         
00483 
00484         
00489         int getFeedId() const;
00490         
00491  
00492         
00493         
00503         void setFeedId (int feedId);
00504                 
00505         
00506         
00507         
00508 
00509 
00510         
00511         // ===> Attribute spectralWindowId
00512         
00513         
00514         
00515 
00516         
00521         Tag getSpectralWindowId() const;
00522         
00523  
00524         
00525         
00535         void setSpectralWindowId (Tag spectralWindowId);
00536                 
00537         
00538         
00539         
00540 
00541 
00543         // Links //
00545         
00546         
00547 
00548         
00549                 
00556          AntennaRow* getAntennaUsingAntennaId();
00557          
00558 
00559         
00560 
00561         
00562 
00563         
00564                 
00571          SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00572          
00573 
00574         
00575 
00576         
00577 
00578         
00579                 
00580         // ===> Slice link from a row of CalDevice table to a collection of row of Feed table.
00581         
00587         vector <FeedRow *> getFeeds();
00588         
00589         
00590 
00591         
00592 
00593         
00594         
00595         
00613         bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numCalload, vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
00614         
00615         
00616 
00617         
00627         bool compareRequiredValue(int numCalload, vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames); 
00628                  
00629         
00638         bool equalByRequiredValue(CalDeviceRow* x) ;
00639         
00640 #ifndef WITHOUT_ACS
00641 
00645         asdmIDL::CalDeviceRowIDL *toIDL() const;
00646 #endif
00647         
00648 #ifndef WITHOUT_ACS
00649 
00654         void setFromIDL (asdmIDL::CalDeviceRowIDL x) ;
00655 #endif
00656         
00661         std::string toXML() const;
00662 
00669         void setFromXML (std::string rowDoc) ;
00670 
00673         // binary-deserialization material from an EndianIStream  //
00675 
00676         std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods;
00677 void antennaIdFromBin( EndianIStream& eis);
00678 void spectralWindowIdFromBin( EndianIStream& eis);
00679 void timeIntervalFromBin( EndianIStream& eis);
00680 void feedIdFromBin( EndianIStream& eis);
00681 void numCalloadFromBin( EndianIStream& eis);
00682 void calLoadNamesFromBin( EndianIStream& eis);
00683 
00684 void numReceptorFromBin( EndianIStream& eis);
00685 void calEffFromBin( EndianIStream& eis);
00686 void noiseCalFromBin( EndianIStream& eis);
00687 void coupledNoiseCalFromBin( EndianIStream& eis);
00688 void temperatureLoadFromBin( EndianIStream& eis);
00689 
00690 
00698          static CalDeviceRow* fromBin(EndianIStream& eis, CalDeviceTable& table, const std::vector<std::string>& attributesSeq);         
00700 
00701 private:
00705         CalDeviceTable &table;
00709         bool hasBeenAdded;
00710 
00711         // This method is used by the Table class when this row is added to the table.
00712         void isAdded(bool added);
00713 
00714 
00723         CalDeviceRow (CalDeviceTable &table);
00724 
00742          CalDeviceRow (CalDeviceTable &table, CalDeviceRow &row);
00743                 
00745         // Intrinsic Table Attributes //
00747         
00748         
00749         // ===> Attribute timeInterval
00750         
00751         
00752 
00753         ArrayTimeInterval timeInterval;
00754 
00755         
00756         
00757         
00758 
00759         
00760         // ===> Attribute numCalload
00761         
00762         
00763 
00764         int numCalload;
00765 
00766         
00767         
00768         
00769 
00770         
00771         // ===> Attribute calLoadNames
00772         
00773         
00774 
00775         vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames;
00776 
00777         
00778         
00779         
00780 
00781         
00782         // ===> Attribute numReceptor, which is optional
00783         
00784         
00785         bool numReceptorExists;
00786         
00787 
00788         int numReceptor;
00789 
00790         
00791         
00792         
00793 
00794         
00795         // ===> Attribute calEff, which is optional
00796         
00797         
00798         bool calEffExists;
00799         
00800 
00801         vector<vector<float > > calEff;
00802 
00803         
00804         
00805         
00806 
00807         
00808         // ===> Attribute noiseCal, which is optional
00809         
00810         
00811         bool noiseCalExists;
00812         
00813 
00814         vector<double > noiseCal;
00815 
00816         
00817         
00818         
00819 
00820         
00821         // ===> Attribute coupledNoiseCal, which is optional
00822         
00823         
00824         bool coupledNoiseCalExists;
00825         
00826 
00827         vector<vector<float > > coupledNoiseCal;
00828 
00829         
00830         
00831         
00832 
00833         
00834         // ===> Attribute temperatureLoad, which is optional
00835         
00836         
00837         bool temperatureLoadExists;
00838         
00839 
00840         vector<Temperature > temperatureLoad;
00841 
00842         
00843         
00844         
00845 
00847         // Extrinsic Table Attributes //
00849         
00850         
00851         // ===> Attribute antennaId
00852         
00853         
00854 
00855         Tag antennaId;
00856 
00857         
00858         
00859         
00860 
00861         
00862         // ===> Attribute feedId
00863         
00864         
00865 
00866         int feedId;
00867 
00868         
00869         
00870         
00871 
00872         
00873         // ===> Attribute spectralWindowId
00874         
00875         
00876 
00877         Tag spectralWindowId;
00878 
00879         
00880         
00881         
00882 
00884         // Links //
00886         
00887         
00888                 
00889 
00890          
00891 
00892         
00893 
00894         
00895                 
00896 
00897          
00898 
00899         
00900 
00901         
00902                 
00903 
00904 
00905         
00906 
00907         
00908 /*
00910         // binary-deserialization material from an EndianIStream  //
00912         std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods;
00913 void antennaIdFromBin( EndianIStream& eis);
00914 void spectralWindowIdFromBin( EndianIStream& eis);
00915 void timeIntervalFromBin( EndianIStream& eis);
00916 void feedIdFromBin( EndianIStream& eis);
00917 void numCalloadFromBin( EndianIStream& eis);
00918 void calLoadNamesFromBin( EndianIStream& eis);
00919 
00920 void numReceptorFromBin( EndianIStream& eis);
00921 void calEffFromBin( EndianIStream& eis);
00922 void noiseCalFromBin( EndianIStream& eis);
00923 void coupledNoiseCalFromBin( EndianIStream& eis);
00924 void temperatureLoadFromBin( EndianIStream& eis);
00925 
00926 */
00927         
00929         // text-deserialization material //
00931         std::map<std::string, CalDeviceAttributeFromText> fromTextMethods;
00932         
00933 void antennaIdFromText (const string & s);
00934         
00935         
00936 void spectralWindowIdFromText (const string & s);
00937         
00938         
00939 void timeIntervalFromText (const string & s);
00940         
00941         
00942 void feedIdFromText (const string & s);
00943         
00944         
00945 void numCalloadFromText (const string & s);
00946         
00947         
00948 void calLoadNamesFromText (const string & s);
00949         
00950 
00951         
00952 void numReceptorFromText (const string & s);
00953         
00954         
00955 void calEffFromText (const string & s);
00956         
00957         
00958 void noiseCalFromText (const string & s);
00959         
00960         
00961 void coupledNoiseCalFromText (const string & s);
00962         
00963         
00964 void temperatureLoadFromText (const string & s);
00965         
00966         
00967         
00968         void fromText(const std::string& attributeName, const std::string&  t);
00969         
00974          void toBin(EndianOSStream& eoss);
00975                  
00985 };
00986 
00987 } // End namespace asdm
00988 
00989 #endif /* CalDevice_CLASS */