casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SubscanRow.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 SubscanRow.h
00032  */
00033  
00034 #ifndef SubscanRow_CLASS
00035 #define SubscanRow_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 #include "CSubscanIntent.h"
00073         
00074 
00075         
00076 #include "CSwitchingMode.h"
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 #include "CCorrelatorCalibration.h"
00085         
00086 
00087 
00088 
00089 #include <ConversionException.h>
00090 #include <NoSuchRow.h>
00091 #include <IllegalAccessException.h>
00092 
00093 #include <RowTransformer.h>
00094 //#include <TableStreamReader.h>
00095 
00096 /*\file Subscan.h
00097     \brief Generated from model's revision "1.64", branch "HEAD"
00098 */
00099 
00100 namespace asdm {
00101 
00102 //class asdm::SubscanTable;
00103 
00104 
00105 // class asdm::ExecBlockRow;
00106 class ExecBlockRow;
00107         
00108 
00109 class SubscanRow;
00110 typedef void (SubscanRow::*SubscanAttributeFromBin) (EndianIStream& eis);
00111 typedef void (SubscanRow::*SubscanAttributeFromText) (const string& s);
00112 
00119 class SubscanRow {
00120 friend class asdm::SubscanTable;
00121 friend class asdm::RowTransformer<SubscanRow>;
00122 //friend class asdm::TableStreamReader<SubscanTable, SubscanRow>;
00123 
00124 public:
00125 
00126         virtual ~SubscanRow();
00127 
00131         SubscanTable &getTable() const;
00132         
00137         bool isAdded() const;
00138                 
00140         // Intrinsic Table Attributes //
00142         
00143         
00144         // ===> Attribute scanNumber
00145         
00146         
00147         
00148 
00149         
00154         int getScanNumber() const;
00155         
00156  
00157         
00158         
00168         void setScanNumber (int scanNumber);
00169                 
00170         
00171         
00172         
00173 
00174 
00175         
00176         // ===> Attribute subscanNumber
00177         
00178         
00179         
00180 
00181         
00186         int getSubscanNumber() const;
00187         
00188  
00189         
00190         
00200         void setSubscanNumber (int subscanNumber);
00201                 
00202         
00203         
00204         
00205 
00206 
00207         
00208         // ===> Attribute startTime
00209         
00210         
00211         
00212 
00213         
00218         ArrayTime getStartTime() const;
00219         
00220  
00221         
00222         
00230         void setStartTime (ArrayTime startTime);
00231                 
00232         
00233         
00234         
00235 
00236 
00237         
00238         // ===> Attribute endTime
00239         
00240         
00241         
00242 
00243         
00248         ArrayTime getEndTime() const;
00249         
00250  
00251         
00252         
00260         void setEndTime (ArrayTime endTime);
00261                 
00262         
00263         
00264         
00265 
00266 
00267         
00268         // ===> Attribute fieldName
00269         
00270         
00271         
00272 
00273         
00278         string getFieldName() const;
00279         
00280  
00281         
00282         
00290         void setFieldName (string fieldName);
00291                 
00292         
00293         
00294         
00295 
00296 
00297         
00298         // ===> Attribute subscanIntent
00299         
00300         
00301         
00302 
00303         
00308         SubscanIntentMod::SubscanIntent getSubscanIntent() const;
00309         
00310  
00311         
00312         
00320         void setSubscanIntent (SubscanIntentMod::SubscanIntent subscanIntent);
00321                 
00322         
00323         
00324         
00325 
00326 
00327         
00328         // ===> Attribute subscanMode, which is optional
00329         
00330         
00331         
00336         bool isSubscanModeExists() const;
00337         
00338 
00339         
00345         SwitchingModeMod::SwitchingMode getSubscanMode() const;
00346         
00347  
00348         
00349         
00356         void setSubscanMode (SwitchingModeMod::SwitchingMode subscanMode);
00357                 
00358         
00359         
00360         
00364         void clearSubscanMode ();
00365         
00366 
00367 
00368         
00369         // ===> Attribute numIntegration
00370         
00371         
00372         
00373 
00374         
00379         int getNumIntegration() const;
00380         
00381  
00382         
00383         
00391         void setNumIntegration (int numIntegration);
00392                 
00393         
00394         
00395         
00396 
00397 
00398         
00399         // ===> Attribute numSubintegration
00400         
00401         
00402         
00403 
00404         
00409         vector<int > getNumSubintegration() const;
00410         
00411  
00412         
00413         
00421         void setNumSubintegration (vector<int > numSubintegration);
00422                 
00423         
00424         
00425         
00426 
00427 
00428         
00429         // ===> Attribute correlatorCalibration, which is optional
00430         
00431         
00432         
00437         bool isCorrelatorCalibrationExists() const;
00438         
00439 
00440         
00446         CorrelatorCalibrationMod::CorrelatorCalibration getCorrelatorCalibration() const;
00447         
00448  
00449         
00450         
00457         void setCorrelatorCalibration (CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration);
00458                 
00459         
00460         
00461         
00465         void clearCorrelatorCalibration ();
00466         
00467 
00468 
00470         // Extrinsic Table Attributes //
00472         
00473         
00474         // ===> Attribute execBlockId
00475         
00476         
00477         
00478 
00479         
00484         Tag getExecBlockId() const;
00485         
00486  
00487         
00488         
00498         void setExecBlockId (Tag execBlockId);
00499                 
00500         
00501         
00502         
00503 
00504 
00506         // Links //
00508         
00509         
00510 
00511         
00512                 
00519          ExecBlockRow* getExecBlockUsingExecBlockId();
00520          
00521 
00522         
00523 
00524         
00525         
00526         
00550         bool compareNoAutoInc(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, vector<int > numSubintegration);
00551         
00552         
00553 
00554         
00572         bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, vector<int > numSubintegration); 
00573                  
00574         
00583         bool equalByRequiredValue(SubscanRow* x) ;
00584         
00585 #ifndef WITHOUT_ACS
00586 
00590         asdmIDL::SubscanRowIDL *toIDL() const;
00591         
00599          void toIDL(asdmIDL::SubscanRowIDL& x) const;
00600 #endif
00601         
00602 #ifndef WITHOUT_ACS
00603 
00608         void setFromIDL (asdmIDL::SubscanRowIDL x) ;
00609 #endif
00610         
00615         std::string toXML() const;
00616 
00623         void setFromXML (std::string rowDoc) ;
00624 
00627         // binary-deserialization material from an EndianIStream  //
00629 
00630         std::map<std::string, SubscanAttributeFromBin> fromBinMethods;
00631 void execBlockIdFromBin( EndianIStream& eis);
00632 void scanNumberFromBin( EndianIStream& eis);
00633 void subscanNumberFromBin( EndianIStream& eis);
00634 void startTimeFromBin( EndianIStream& eis);
00635 void endTimeFromBin( EndianIStream& eis);
00636 void fieldNameFromBin( EndianIStream& eis);
00637 void subscanIntentFromBin( EndianIStream& eis);
00638 void numIntegrationFromBin( EndianIStream& eis);
00639 void numSubintegrationFromBin( EndianIStream& eis);
00640 
00641 void subscanModeFromBin( EndianIStream& eis);
00642 void correlatorCalibrationFromBin( EndianIStream& eis);
00643 
00644 
00652          static SubscanRow* fromBin(EndianIStream& eis, SubscanTable& table, const std::vector<std::string>& attributesSeq);     
00653  
00660          void fromText(const std::string& attributeName, const std::string&  t);
00662 
00663 private:
00667         SubscanTable &table;
00671         bool hasBeenAdded;
00672 
00673         // This method is used by the Table class when this row is added to the table.
00674         void isAdded(bool added);
00675 
00676 
00685         SubscanRow (SubscanTable &table);
00686 
00704          SubscanRow (SubscanTable &table, SubscanRow &row);
00705                 
00707         // Intrinsic Table Attributes //
00709         
00710         
00711         // ===> Attribute scanNumber
00712         
00713         
00714 
00715         int scanNumber;
00716 
00717         
00718         
00719         
00720 
00721         
00722         // ===> Attribute subscanNumber
00723         
00724         
00725 
00726         int subscanNumber;
00727 
00728         
00729         
00730         
00731 
00732         
00733         // ===> Attribute startTime
00734         
00735         
00736 
00737         ArrayTime startTime;
00738 
00739         
00740         
00741         
00742 
00743         
00744         // ===> Attribute endTime
00745         
00746         
00747 
00748         ArrayTime endTime;
00749 
00750         
00751         
00752         
00753 
00754         
00755         // ===> Attribute fieldName
00756         
00757         
00758 
00759         string fieldName;
00760 
00761         
00762         
00763         
00764 
00765         
00766         // ===> Attribute subscanIntent
00767         
00768         
00769 
00770         SubscanIntentMod::SubscanIntent subscanIntent;
00771 
00772         
00773         
00774         
00775 
00776         
00777         // ===> Attribute subscanMode, which is optional
00778         
00779         
00780         bool subscanModeExists;
00781         
00782 
00783         SwitchingModeMod::SwitchingMode subscanMode;
00784 
00785         
00786         
00787         
00788 
00789         
00790         // ===> Attribute numIntegration
00791         
00792         
00793 
00794         int numIntegration;
00795 
00796         
00797         
00798         
00799 
00800         
00801         // ===> Attribute numSubintegration
00802         
00803         
00804 
00805         vector<int > numSubintegration;
00806 
00807         
00808         
00809         
00810 
00811         
00812         // ===> Attribute correlatorCalibration, which is optional
00813         
00814         
00815         bool correlatorCalibrationExists;
00816         
00817 
00818         CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration;
00819 
00820         
00821         
00822         
00823 
00825         // Extrinsic Table Attributes //
00827         
00828         
00829         // ===> Attribute execBlockId
00830         
00831         
00832 
00833         Tag execBlockId;
00834 
00835         
00836         
00837         
00838 
00840         // Links //
00842         
00843         
00844                 
00845 
00846          
00847 
00848         
00849 
00850         
00851 /*
00853         // binary-deserialization material from an EndianIStream  //
00855         std::map<std::string, SubscanAttributeFromBin> fromBinMethods;
00856 void execBlockIdFromBin( EndianIStream& eis);
00857 void scanNumberFromBin( EndianIStream& eis);
00858 void subscanNumberFromBin( EndianIStream& eis);
00859 void startTimeFromBin( EndianIStream& eis);
00860 void endTimeFromBin( EndianIStream& eis);
00861 void fieldNameFromBin( EndianIStream& eis);
00862 void subscanIntentFromBin( EndianIStream& eis);
00863 void numIntegrationFromBin( EndianIStream& eis);
00864 void numSubintegrationFromBin( EndianIStream& eis);
00865 
00866 void subscanModeFromBin( EndianIStream& eis);
00867 void correlatorCalibrationFromBin( EndianIStream& eis);
00868 
00869 */
00870         
00872         // text-deserialization material //
00874         std::map<std::string, SubscanAttributeFromText> fromTextMethods;
00875         
00876 void execBlockIdFromText (const string & s);
00877         
00878         
00879 void scanNumberFromText (const string & s);
00880         
00881         
00882 void subscanNumberFromText (const string & s);
00883         
00884         
00885 void startTimeFromText (const string & s);
00886         
00887         
00888 void endTimeFromText (const string & s);
00889         
00890         
00891 void fieldNameFromText (const string & s);
00892         
00893         
00894 void subscanIntentFromText (const string & s);
00895         
00896         
00897 void numIntegrationFromText (const string & s);
00898         
00899         
00900 void numSubintegrationFromText (const string & s);
00901         
00902 
00903         
00904 void subscanModeFromText (const string & s);
00905         
00906         
00907 void correlatorCalibrationFromText (const string & s);
00908         
00909         
00910         
00915          void toBin(EndianOSStream& eoss);
00916                  
00926 };
00927 
00928 } // End namespace asdm
00929 
00930 #endif /* Subscan_CLASS */