casa  $Rev:20696$
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.62", 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);     
00640  
00647          void fromText(const std::string& attributeName, const std::string&  t);
00649 
00650 private:
00654         CalGainTable &table;
00658         bool hasBeenAdded;
00659 
00660         // This method is used by the Table class when this row is added to the table.
00661         void isAdded(bool added);
00662 
00663 
00672         CalGainRow (CalGainTable &table);
00673 
00691          CalGainRow (CalGainTable &table, CalGainRow &row);
00692                 
00694         // Intrinsic Table Attributes //
00696         
00697         
00698         // ===> Attribute startValidTime
00699         
00700         
00701 
00702         ArrayTime startValidTime;
00703 
00704         
00705         
00706         
00707 
00708         
00709         // ===> Attribute endValidTime
00710         
00711         
00712 
00713         ArrayTime endValidTime;
00714 
00715         
00716         
00717         
00718 
00719         
00720         // ===> Attribute gain
00721         
00722         
00723 
00724         float gain;
00725 
00726         
00727         
00728         
00729 
00730         
00731         // ===> Attribute gainValid
00732         
00733         
00734 
00735         bool gainValid;
00736 
00737         
00738         
00739         
00740 
00741         
00742         // ===> Attribute fit
00743         
00744         
00745 
00746         float fit;
00747 
00748         
00749         
00750         
00751 
00752         
00753         // ===> Attribute fitWeight
00754         
00755         
00756 
00757         float fitWeight;
00758 
00759         
00760         
00761         
00762 
00763         
00764         // ===> Attribute totalGainValid
00765         
00766         
00767 
00768         bool totalGainValid;
00769 
00770         
00771         
00772         
00773 
00774         
00775         // ===> Attribute totalFit
00776         
00777         
00778 
00779         float totalFit;
00780 
00781         
00782         
00783         
00784 
00785         
00786         // ===> Attribute totalFitWeight
00787         
00788         
00789 
00790         float totalFitWeight;
00791 
00792         
00793         
00794         
00795 
00797         // Extrinsic Table Attributes //
00799         
00800         
00801         // ===> Attribute calDataId
00802         
00803         
00804 
00805         Tag calDataId;
00806 
00807         
00808         
00809         
00810 
00811         
00812         // ===> Attribute calReductionId
00813         
00814         
00815 
00816         Tag calReductionId;
00817 
00818         
00819         
00820         
00821 
00823         // Links //
00825         
00826         
00827                 
00828 
00829          
00830 
00831         
00832 
00833         
00834                 
00835 
00836          
00837 
00838         
00839 
00840         
00841 /*
00843         // binary-deserialization material from an EndianIStream  //
00845         std::map<std::string, CalGainAttributeFromBin> fromBinMethods;
00846 void calDataIdFromBin( EndianIStream& eis);
00847 void calReductionIdFromBin( EndianIStream& eis);
00848 void startValidTimeFromBin( EndianIStream& eis);
00849 void endValidTimeFromBin( EndianIStream& eis);
00850 void gainFromBin( EndianIStream& eis);
00851 void gainValidFromBin( EndianIStream& eis);
00852 void fitFromBin( EndianIStream& eis);
00853 void fitWeightFromBin( EndianIStream& eis);
00854 void totalGainValidFromBin( EndianIStream& eis);
00855 void totalFitFromBin( EndianIStream& eis);
00856 void totalFitWeightFromBin( EndianIStream& eis);
00857 
00858         
00859 */
00860         
00862         // text-deserialization material //
00864         std::map<std::string, CalGainAttributeFromText> fromTextMethods;
00865         
00866 void calDataIdFromText (const string & s);
00867         
00868         
00869 void calReductionIdFromText (const string & s);
00870         
00871         
00872 void startValidTimeFromText (const string & s);
00873         
00874         
00875 void endValidTimeFromText (const string & s);
00876         
00877         
00878 void gainFromText (const string & s);
00879         
00880         
00881 void gainValidFromText (const string & s);
00882         
00883         
00884 void fitFromText (const string & s);
00885         
00886         
00887 void fitWeightFromText (const string & s);
00888         
00889         
00890 void totalGainValidFromText (const string & s);
00891         
00892         
00893 void totalFitFromText (const string & s);
00894         
00895         
00896 void totalFitWeightFromText (const string & s);
00897         
00898 
00899                 
00900         
00905          void toBin(EndianOSStream& eoss);
00906                  
00916 };
00917 
00918 } // End namespace asdm
00919 
00920 #endif /* CalGain_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines