casa  $Rev:20696$
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.62", 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);         
00699  
00706          void fromText(const std::string& attributeName, const std::string&  t);
00708 
00709 private:
00713         CalDeviceTable &table;
00717         bool hasBeenAdded;
00718 
00719         // This method is used by the Table class when this row is added to the table.
00720         void isAdded(bool added);
00721 
00722 
00731         CalDeviceRow (CalDeviceTable &table);
00732 
00750          CalDeviceRow (CalDeviceTable &table, CalDeviceRow &row);
00751                 
00753         // Intrinsic Table Attributes //
00755         
00756         
00757         // ===> Attribute timeInterval
00758         
00759         
00760 
00761         ArrayTimeInterval timeInterval;
00762 
00763         
00764         
00765         
00766 
00767         
00768         // ===> Attribute numCalload
00769         
00770         
00771 
00772         int numCalload;
00773 
00774         
00775         
00776         
00777 
00778         
00779         // ===> Attribute calLoadNames
00780         
00781         
00782 
00783         vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames;
00784 
00785         
00786         
00787         
00788 
00789         
00790         // ===> Attribute numReceptor, which is optional
00791         
00792         
00793         bool numReceptorExists;
00794         
00795 
00796         int numReceptor;
00797 
00798         
00799         
00800         
00801 
00802         
00803         // ===> Attribute calEff, which is optional
00804         
00805         
00806         bool calEffExists;
00807         
00808 
00809         vector<vector<float > > calEff;
00810 
00811         
00812         
00813         
00814 
00815         
00816         // ===> Attribute noiseCal, which is optional
00817         
00818         
00819         bool noiseCalExists;
00820         
00821 
00822         vector<double > noiseCal;
00823 
00824         
00825         
00826         
00827 
00828         
00829         // ===> Attribute coupledNoiseCal, which is optional
00830         
00831         
00832         bool coupledNoiseCalExists;
00833         
00834 
00835         vector<vector<float > > coupledNoiseCal;
00836 
00837         
00838         
00839         
00840 
00841         
00842         // ===> Attribute temperatureLoad, which is optional
00843         
00844         
00845         bool temperatureLoadExists;
00846         
00847 
00848         vector<Temperature > temperatureLoad;
00849 
00850         
00851         
00852         
00853 
00855         // Extrinsic Table Attributes //
00857         
00858         
00859         // ===> Attribute antennaId
00860         
00861         
00862 
00863         Tag antennaId;
00864 
00865         
00866         
00867         
00868 
00869         
00870         // ===> Attribute feedId
00871         
00872         
00873 
00874         int feedId;
00875 
00876         
00877         
00878         
00879 
00880         
00881         // ===> Attribute spectralWindowId
00882         
00883         
00884 
00885         Tag spectralWindowId;
00886 
00887         
00888         
00889         
00890 
00892         // Links //
00894         
00895         
00896                 
00897 
00898          
00899 
00900         
00901 
00902         
00903                 
00904 
00905          
00906 
00907         
00908 
00909         
00910                 
00911 
00912 
00913         
00914 
00915         
00916 /*
00918         // binary-deserialization material from an EndianIStream  //
00920         std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods;
00921 void antennaIdFromBin( EndianIStream& eis);
00922 void spectralWindowIdFromBin( EndianIStream& eis);
00923 void timeIntervalFromBin( EndianIStream& eis);
00924 void feedIdFromBin( EndianIStream& eis);
00925 void numCalloadFromBin( EndianIStream& eis);
00926 void calLoadNamesFromBin( EndianIStream& eis);
00927 
00928 void numReceptorFromBin( EndianIStream& eis);
00929 void calEffFromBin( EndianIStream& eis);
00930 void noiseCalFromBin( EndianIStream& eis);
00931 void coupledNoiseCalFromBin( EndianIStream& eis);
00932 void temperatureLoadFromBin( EndianIStream& eis);
00933 
00934 */
00935         
00937         // text-deserialization material //
00939         std::map<std::string, CalDeviceAttributeFromText> fromTextMethods;
00940         
00941 void antennaIdFromText (const string & s);
00942         
00943         
00944 void spectralWindowIdFromText (const string & s);
00945         
00946         
00947 void timeIntervalFromText (const string & s);
00948         
00949         
00950 void feedIdFromText (const string & s);
00951         
00952         
00953 void numCalloadFromText (const string & s);
00954         
00955         
00956 void calLoadNamesFromText (const string & s);
00957         
00958 
00959         
00960 void numReceptorFromText (const string & s);
00961         
00962         
00963 void calEffFromText (const string & s);
00964         
00965         
00966 void noiseCalFromText (const string & s);
00967         
00968         
00969 void coupledNoiseCalFromText (const string & s);
00970         
00971         
00972 void temperatureLoadFromText (const string & s);
00973         
00974         
00975         
00980          void toBin(EndianOSStream& eoss);
00981                  
00991 };
00992 
00993 } // End namespace asdm
00994 
00995 #endif /* CalDevice_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines