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.64", 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         
00595          void toIDL(asdmIDL::CalGainRowIDL& x) const;
00596 #endif
00597         
00598 #ifndef WITHOUT_ACS
00599 
00604         void setFromIDL (asdmIDL::CalGainRowIDL x) ;
00605 #endif
00606         
00611         std::string toXML() const;
00612 
00619         void setFromXML (std::string rowDoc) ;
00620 
00623         // binary-deserialization material from an EndianIStream  //
00625 
00626         std::map<std::string, CalGainAttributeFromBin> fromBinMethods;
00627 void calDataIdFromBin( EndianIStream& eis);
00628 void calReductionIdFromBin( EndianIStream& eis);
00629 void startValidTimeFromBin( EndianIStream& eis);
00630 void endValidTimeFromBin( EndianIStream& eis);
00631 void gainFromBin( EndianIStream& eis);
00632 void gainValidFromBin( EndianIStream& eis);
00633 void fitFromBin( EndianIStream& eis);
00634 void fitWeightFromBin( EndianIStream& eis);
00635 void totalGainValidFromBin( EndianIStream& eis);
00636 void totalFitFromBin( EndianIStream& eis);
00637 void totalFitWeightFromBin( EndianIStream& eis);
00638 
00639         
00640 
00648          static CalGainRow* fromBin(EndianIStream& eis, CalGainTable& table, const std::vector<std::string>& attributesSeq);     
00649  
00656          void fromText(const std::string& attributeName, const std::string&  t);
00658 
00659 private:
00663         CalGainTable &table;
00667         bool hasBeenAdded;
00668 
00669         // This method is used by the Table class when this row is added to the table.
00670         void isAdded(bool added);
00671 
00672 
00681         CalGainRow (CalGainTable &table);
00682 
00700          CalGainRow (CalGainTable &table, CalGainRow &row);
00701                 
00703         // Intrinsic Table Attributes //
00705         
00706         
00707         // ===> Attribute startValidTime
00708         
00709         
00710 
00711         ArrayTime startValidTime;
00712 
00713         
00714         
00715         
00716 
00717         
00718         // ===> Attribute endValidTime
00719         
00720         
00721 
00722         ArrayTime endValidTime;
00723 
00724         
00725         
00726         
00727 
00728         
00729         // ===> Attribute gain
00730         
00731         
00732 
00733         float gain;
00734 
00735         
00736         
00737         
00738 
00739         
00740         // ===> Attribute gainValid
00741         
00742         
00743 
00744         bool gainValid;
00745 
00746         
00747         
00748         
00749 
00750         
00751         // ===> Attribute fit
00752         
00753         
00754 
00755         float fit;
00756 
00757         
00758         
00759         
00760 
00761         
00762         // ===> Attribute fitWeight
00763         
00764         
00765 
00766         float fitWeight;
00767 
00768         
00769         
00770         
00771 
00772         
00773         // ===> Attribute totalGainValid
00774         
00775         
00776 
00777         bool totalGainValid;
00778 
00779         
00780         
00781         
00782 
00783         
00784         // ===> Attribute totalFit
00785         
00786         
00787 
00788         float totalFit;
00789 
00790         
00791         
00792         
00793 
00794         
00795         // ===> Attribute totalFitWeight
00796         
00797         
00798 
00799         float totalFitWeight;
00800 
00801         
00802         
00803         
00804 
00806         // Extrinsic Table Attributes //
00808         
00809         
00810         // ===> Attribute calDataId
00811         
00812         
00813 
00814         Tag calDataId;
00815 
00816         
00817         
00818         
00819 
00820         
00821         // ===> Attribute calReductionId
00822         
00823         
00824 
00825         Tag calReductionId;
00826 
00827         
00828         
00829         
00830 
00832         // Links //
00834         
00835         
00836                 
00837 
00838          
00839 
00840         
00841 
00842         
00843                 
00844 
00845          
00846 
00847         
00848 
00849         
00850 /*
00852         // binary-deserialization material from an EndianIStream  //
00854         std::map<std::string, CalGainAttributeFromBin> fromBinMethods;
00855 void calDataIdFromBin( EndianIStream& eis);
00856 void calReductionIdFromBin( EndianIStream& eis);
00857 void startValidTimeFromBin( EndianIStream& eis);
00858 void endValidTimeFromBin( EndianIStream& eis);
00859 void gainFromBin( EndianIStream& eis);
00860 void gainValidFromBin( EndianIStream& eis);
00861 void fitFromBin( EndianIStream& eis);
00862 void fitWeightFromBin( EndianIStream& eis);
00863 void totalGainValidFromBin( EndianIStream& eis);
00864 void totalFitFromBin( EndianIStream& eis);
00865 void totalFitWeightFromBin( EndianIStream& eis);
00866 
00867         
00868 */
00869         
00871         // text-deserialization material //
00873         std::map<std::string, CalGainAttributeFromText> fromTextMethods;
00874         
00875 void calDataIdFromText (const string & s);
00876         
00877         
00878 void calReductionIdFromText (const string & s);
00879         
00880         
00881 void startValidTimeFromText (const string & s);
00882         
00883         
00884 void endValidTimeFromText (const string & s);
00885         
00886         
00887 void gainFromText (const string & s);
00888         
00889         
00890 void gainValidFromText (const string & s);
00891         
00892         
00893 void fitFromText (const string & s);
00894         
00895         
00896 void fitWeightFromText (const string & s);
00897         
00898         
00899 void totalGainValidFromText (const string & s);
00900         
00901         
00902 void totalFitFromText (const string & s);
00903         
00904         
00905 void totalFitWeightFromText (const string & s);
00906         
00907 
00908                 
00909         
00914          void toBin(EndianOSStream& eoss);
00915                  
00925 };
00926 
00927 } // End namespace asdm
00928 
00929 #endif /* CalGain_CLASS */