casa  $Rev:20696$
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.62", 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 #endif
00592         
00593 #ifndef WITHOUT_ACS
00594 
00599         void setFromIDL (asdmIDL::SubscanRowIDL x) ;
00600 #endif
00601         
00606         std::string toXML() const;
00607 
00614         void setFromXML (std::string rowDoc) ;
00615 
00618         // binary-deserialization material from an EndianIStream  //
00620 
00621         std::map<std::string, SubscanAttributeFromBin> fromBinMethods;
00622 void execBlockIdFromBin( EndianIStream& eis);
00623 void scanNumberFromBin( EndianIStream& eis);
00624 void subscanNumberFromBin( EndianIStream& eis);
00625 void startTimeFromBin( EndianIStream& eis);
00626 void endTimeFromBin( EndianIStream& eis);
00627 void fieldNameFromBin( EndianIStream& eis);
00628 void subscanIntentFromBin( EndianIStream& eis);
00629 void numIntegrationFromBin( EndianIStream& eis);
00630 void numSubintegrationFromBin( EndianIStream& eis);
00631 
00632 void subscanModeFromBin( EndianIStream& eis);
00633 void correlatorCalibrationFromBin( EndianIStream& eis);
00634 
00635 
00643          static SubscanRow* fromBin(EndianIStream& eis, SubscanTable& table, const std::vector<std::string>& attributesSeq);     
00644  
00651          void fromText(const std::string& attributeName, const std::string&  t);
00653 
00654 private:
00658         SubscanTable &table;
00662         bool hasBeenAdded;
00663 
00664         // This method is used by the Table class when this row is added to the table.
00665         void isAdded(bool added);
00666 
00667 
00676         SubscanRow (SubscanTable &table);
00677 
00695          SubscanRow (SubscanTable &table, SubscanRow &row);
00696                 
00698         // Intrinsic Table Attributes //
00700         
00701         
00702         // ===> Attribute scanNumber
00703         
00704         
00705 
00706         int scanNumber;
00707 
00708         
00709         
00710         
00711 
00712         
00713         // ===> Attribute subscanNumber
00714         
00715         
00716 
00717         int subscanNumber;
00718 
00719         
00720         
00721         
00722 
00723         
00724         // ===> Attribute startTime
00725         
00726         
00727 
00728         ArrayTime startTime;
00729 
00730         
00731         
00732         
00733 
00734         
00735         // ===> Attribute endTime
00736         
00737         
00738 
00739         ArrayTime endTime;
00740 
00741         
00742         
00743         
00744 
00745         
00746         // ===> Attribute fieldName
00747         
00748         
00749 
00750         string fieldName;
00751 
00752         
00753         
00754         
00755 
00756         
00757         // ===> Attribute subscanIntent
00758         
00759         
00760 
00761         SubscanIntentMod::SubscanIntent subscanIntent;
00762 
00763         
00764         
00765         
00766 
00767         
00768         // ===> Attribute subscanMode, which is optional
00769         
00770         
00771         bool subscanModeExists;
00772         
00773 
00774         SwitchingModeMod::SwitchingMode subscanMode;
00775 
00776         
00777         
00778         
00779 
00780         
00781         // ===> Attribute numIntegration
00782         
00783         
00784 
00785         int numIntegration;
00786 
00787         
00788         
00789         
00790 
00791         
00792         // ===> Attribute numSubintegration
00793         
00794         
00795 
00796         vector<int > numSubintegration;
00797 
00798         
00799         
00800         
00801 
00802         
00803         // ===> Attribute correlatorCalibration, which is optional
00804         
00805         
00806         bool correlatorCalibrationExists;
00807         
00808 
00809         CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration;
00810 
00811         
00812         
00813         
00814 
00816         // Extrinsic Table Attributes //
00818         
00819         
00820         // ===> Attribute execBlockId
00821         
00822         
00823 
00824         Tag execBlockId;
00825 
00826         
00827         
00828         
00829 
00831         // Links //
00833         
00834         
00835                 
00836 
00837          
00838 
00839         
00840 
00841         
00842 /*
00844         // binary-deserialization material from an EndianIStream  //
00846         std::map<std::string, SubscanAttributeFromBin> fromBinMethods;
00847 void execBlockIdFromBin( EndianIStream& eis);
00848 void scanNumberFromBin( EndianIStream& eis);
00849 void subscanNumberFromBin( EndianIStream& eis);
00850 void startTimeFromBin( EndianIStream& eis);
00851 void endTimeFromBin( EndianIStream& eis);
00852 void fieldNameFromBin( EndianIStream& eis);
00853 void subscanIntentFromBin( EndianIStream& eis);
00854 void numIntegrationFromBin( EndianIStream& eis);
00855 void numSubintegrationFromBin( EndianIStream& eis);
00856 
00857 void subscanModeFromBin( EndianIStream& eis);
00858 void correlatorCalibrationFromBin( EndianIStream& eis);
00859 
00860 */
00861         
00863         // text-deserialization material //
00865         std::map<std::string, SubscanAttributeFromText> fromTextMethods;
00866         
00867 void execBlockIdFromText (const string & s);
00868         
00869         
00870 void scanNumberFromText (const string & s);
00871         
00872         
00873 void subscanNumberFromText (const string & s);
00874         
00875         
00876 void startTimeFromText (const string & s);
00877         
00878         
00879 void endTimeFromText (const string & s);
00880         
00881         
00882 void fieldNameFromText (const string & s);
00883         
00884         
00885 void subscanIntentFromText (const string & s);
00886         
00887         
00888 void numIntegrationFromText (const string & s);
00889         
00890         
00891 void numSubintegrationFromText (const string & s);
00892         
00893 
00894         
00895 void subscanModeFromText (const string & s);
00896         
00897         
00898 void correlatorCalibrationFromText (const string & s);
00899         
00900         
00901         
00906          void toBin(EndianOSStream& eoss);
00907                  
00917 };
00918 
00919 } // End namespace asdm
00920 
00921 #endif /* Subscan_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines