casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalGainRow.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 CalGainRow.h
00032  */
00033  
00034 #ifndef CalGainRow_CLASS
00035 #define CalGainRow_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 <ArrayTime.h>
00052         
00053 
00054          
00055 #include <Tag.h>
00056         
00057 
00058 
00059 
00060 
00061         
00062 
00063         
00064 
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079 
00080 
00081 #include <ConversionException.h>
00082 #include <NoSuchRow.h>
00083 #include <IllegalAccessException.h>
00084 
00085 #include <RowTransformer.h>
00086 //#include <TableStreamReader.h>
00087 
00088 /*\file CalGain.h
00089     \brief Generated from model's revision "1.61", branch "HEAD"
00090 */
00091 
00092 namespace asdm {
00093 
00094 //class asdm::CalGainTable;
00095 
00096 
00097 // class asdm::CalReductionRow;
00098 class CalReductionRow;
00099 
00100 // class asdm::CalDataRow;
00101 class CalDataRow;
00102         
00103 
00104 class CalGainRow;
00105 typedef void (CalGainRow::*CalGainAttributeFromBin) (EndianIStream& eis);
00106 typedef void (CalGainRow::*CalGainAttributeFromText) (const string& s);
00107 
00114 class CalGainRow {
00115 friend class asdm::CalGainTable;
00116 friend class asdm::RowTransformer<CalGainRow>;
00117 //friend class asdm::TableStreamReader<CalGainTable, CalGainRow>;
00118 
00119 public:
00120 
00121         virtual ~CalGainRow();
00122 
00126         CalGainTable &getTable() const;
00127         
00132         bool isAdded() const;
00133                 
00135         // Intrinsic Table Attributes //
00137         
00138         
00139         // ===> Attribute startValidTime
00140         
00141         
00142         
00143 
00144         
00149         ArrayTime getStartValidTime() const;
00150         
00151  
00152         
00153         
00161         void setStartValidTime (ArrayTime startValidTime);
00162                 
00163         
00164         
00165         
00166 
00167 
00168         
00169         // ===> Attribute endValidTime
00170         
00171         
00172         
00173 
00174         
00179         ArrayTime getEndValidTime() const;
00180         
00181  
00182         
00183         
00191         void setEndValidTime (ArrayTime endValidTime);
00192                 
00193         
00194         
00195         
00196 
00197 
00198         
00199         // ===> Attribute gain
00200         
00201         
00202         
00203 
00204         
00209         float getGain() const;
00210         
00211  
00212         
00213         
00221         void setGain (float gain);
00222                 
00223         
00224         
00225         
00226 
00227 
00228         
00229         // ===> Attribute gainValid
00230         
00231         
00232         
00233 
00234         
00239         bool getGainValid() const;
00240         
00241  
00242         
00243         
00251         void setGainValid (bool gainValid);
00252                 
00253         
00254         
00255         
00256 
00257 
00258         
00259         // ===> Attribute fit
00260         
00261         
00262         
00263 
00264         
00269         float getFit() const;
00270         
00271  
00272         
00273         
00281         void setFit (float fit);
00282                 
00283         
00284         
00285         
00286 
00287 
00288         
00289         // ===> Attribute fitWeight
00290         
00291         
00292         
00293 
00294         
00299         float getFitWeight() const;
00300         
00301  
00302         
00303         
00311         void setFitWeight (float fitWeight);
00312                 
00313         
00314         
00315         
00316 
00317 
00318         
00319         // ===> Attribute totalGainValid
00320         
00321         
00322         
00323 
00324         
00329         bool getTotalGainValid() const;
00330         
00331  
00332         
00333         
00341         void setTotalGainValid (bool totalGainValid);
00342                 
00343         
00344         
00345         
00346 
00347 
00348         
00349         // ===> Attribute totalFit
00350         
00351         
00352         
00353 
00354         
00359         float getTotalFit() const;
00360         
00361  
00362         
00363         
00371         void setTotalFit (float totalFit);
00372                 
00373         
00374         
00375         
00376 
00377 
00378         
00379         // ===> Attribute totalFitWeight
00380         
00381         
00382         
00383 
00384         
00389         float getTotalFitWeight() const;
00390         
00391  
00392         
00393         
00401         void setTotalFitWeight (float totalFitWeight);
00402                 
00403         
00404         
00405         
00406 
00407 
00409         // Extrinsic Table Attributes //
00411         
00412         
00413         // ===> Attribute calDataId
00414         
00415         
00416         
00417 
00418         
00423         Tag getCalDataId() const;
00424         
00425  
00426         
00427         
00437         void setCalDataId (Tag calDataId);
00438                 
00439         
00440         
00441         
00442 
00443 
00444         
00445         // ===> Attribute calReductionId
00446         
00447         
00448         
00449 
00450         
00455         Tag getCalReductionId() const;
00456         
00457  
00458         
00459         
00469         void setCalReductionId (Tag calReductionId);
00470                 
00471         
00472         
00473         
00474 
00475 
00477         // Links //
00479         
00480         
00481 
00482         
00483                 
00490          CalReductionRow* getCalReductionUsingCalReductionId();
00491          
00492 
00493         
00494 
00495         
00496 
00497         
00498                 
00505          CalDataRow* getCalDataUsingCalDataId();
00506          
00507 
00508         
00509 
00510         
00511         
00512         
00540         bool compareNoAutoInc(Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight);
00541         
00542         
00543 
00544         
00568         bool compareRequiredValue(ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight); 
00569                  
00570         
00579         bool equalByRequiredValue(CalGainRow* x) ;
00580         
00581 #ifndef WITHOUT_ACS
00582 
00586         asdmIDL::CalGainRowIDL *toIDL() const;
00587 #endif
00588         
00589 #ifndef WITHOUT_ACS
00590 
00595         void setFromIDL (asdmIDL::CalGainRowIDL x) ;
00596 #endif
00597         
00602         std::string toXML() const;
00603 
00610         void setFromXML (std::string rowDoc) ;
00611 
00614         // binary-deserialization material from an EndianIStream  //
00616 
00617         std::map<std::string, CalGainAttributeFromBin> fromBinMethods;
00618 void calDataIdFromBin( EndianIStream& eis);
00619 void calReductionIdFromBin( EndianIStream& eis);
00620 void startValidTimeFromBin( EndianIStream& eis);
00621 void endValidTimeFromBin( EndianIStream& eis);
00622 void gainFromBin( EndianIStream& eis);
00623 void gainValidFromBin( EndianIStream& eis);
00624 void fitFromBin( EndianIStream& eis);
00625 void fitWeightFromBin( EndianIStream& eis);
00626 void totalGainValidFromBin( EndianIStream& eis);
00627 void totalFitFromBin( EndianIStream& eis);
00628 void totalFitWeightFromBin( EndianIStream& eis);
00629 
00630         
00631 
00639          static CalGainRow* fromBin(EndianIStream& eis, CalGainTable& table, const std::vector<std::string>& attributesSeq);     
00641 
00642 private:
00646         CalGainTable &table;
00650         bool hasBeenAdded;
00651 
00652         // This method is used by the Table class when this row is added to the table.
00653         void isAdded(bool added);
00654 
00655 
00664         CalGainRow (CalGainTable &table);
00665 
00683          CalGainRow (CalGainTable &table, CalGainRow &row);
00684                 
00686         // Intrinsic Table Attributes //
00688         
00689         
00690         // ===> Attribute startValidTime
00691         
00692         
00693 
00694         ArrayTime startValidTime;
00695 
00696         
00697         
00698         
00699 
00700         
00701         // ===> Attribute endValidTime
00702         
00703         
00704 
00705         ArrayTime endValidTime;
00706 
00707         
00708         
00709         
00710 
00711         
00712         // ===> Attribute gain
00713         
00714         
00715 
00716         float gain;
00717 
00718         
00719         
00720         
00721 
00722         
00723         // ===> Attribute gainValid
00724         
00725         
00726 
00727         bool gainValid;
00728 
00729         
00730         
00731         
00732 
00733         
00734         // ===> Attribute fit
00735         
00736         
00737 
00738         float fit;
00739 
00740         
00741         
00742         
00743 
00744         
00745         // ===> Attribute fitWeight
00746         
00747         
00748 
00749         float fitWeight;
00750 
00751         
00752         
00753         
00754 
00755         
00756         // ===> Attribute totalGainValid
00757         
00758         
00759 
00760         bool totalGainValid;
00761 
00762         
00763         
00764         
00765 
00766         
00767         // ===> Attribute totalFit
00768         
00769         
00770 
00771         float totalFit;
00772 
00773         
00774         
00775         
00776 
00777         
00778         // ===> Attribute totalFitWeight
00779         
00780         
00781 
00782         float totalFitWeight;
00783 
00784         
00785         
00786         
00787 
00789         // Extrinsic Table Attributes //
00791         
00792         
00793         // ===> Attribute calDataId
00794         
00795         
00796 
00797         Tag calDataId;
00798 
00799         
00800         
00801         
00802 
00803         
00804         // ===> Attribute calReductionId
00805         
00806         
00807 
00808         Tag calReductionId;
00809 
00810         
00811         
00812         
00813 
00815         // Links //
00817         
00818         
00819                 
00820 
00821          
00822 
00823         
00824 
00825         
00826                 
00827 
00828          
00829 
00830         
00831 
00832         
00833 /*
00835         // binary-deserialization material from an EndianIStream  //
00837         std::map<std::string, CalGainAttributeFromBin> fromBinMethods;
00838 void calDataIdFromBin( EndianIStream& eis);
00839 void calReductionIdFromBin( EndianIStream& eis);
00840 void startValidTimeFromBin( EndianIStream& eis);
00841 void endValidTimeFromBin( EndianIStream& eis);
00842 void gainFromBin( EndianIStream& eis);
00843 void gainValidFromBin( EndianIStream& eis);
00844 void fitFromBin( EndianIStream& eis);
00845 void fitWeightFromBin( EndianIStream& eis);
00846 void totalGainValidFromBin( EndianIStream& eis);
00847 void totalFitFromBin( EndianIStream& eis);
00848 void totalFitWeightFromBin( EndianIStream& eis);
00849 
00850         
00851 */
00852         
00854         // text-deserialization material //
00856         std::map<std::string, CalGainAttributeFromText> fromTextMethods;
00857         
00858 void calDataIdFromText (const string & s);
00859         
00860         
00861 void calReductionIdFromText (const string & s);
00862         
00863         
00864 void startValidTimeFromText (const string & s);
00865         
00866         
00867 void endValidTimeFromText (const string & s);
00868         
00869         
00870 void gainFromText (const string & s);
00871         
00872         
00873 void gainValidFromText (const string & s);
00874         
00875         
00876 void fitFromText (const string & s);
00877         
00878         
00879 void fitWeightFromText (const string & s);
00880         
00881         
00882 void totalGainValidFromText (const string & s);
00883         
00884         
00885 void totalFitFromText (const string & s);
00886         
00887         
00888 void totalFitWeightFromText (const string & s);
00889         
00890 
00891                 
00892         
00893         void fromText(const std::string& attributeName, const std::string&  t);
00894         
00899          void toBin(EndianOSStream& eoss);
00900                  
00910 };
00911 
00912 } // End namespace asdm
00913 
00914 #endif /* CalGain_CLASS */