casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
ScanRow.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 ScanRow.h
00032  */
00033  
00034 #ifndef ScanRow_CLASS
00035 #define ScanRow_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 "CScanIntent.h"
00073         
00074 
00075         
00076 #include "CCalDataOrigin.h"
00077         
00078 
00079         
00080 
00081         
00082 #include "CCalibrationFunction.h"
00083         
00084 
00085         
00086 #include "CCalibrationSet.h"
00087         
00088 
00089         
00090 #include "CAntennaMotionPattern.h"
00091         
00092 
00093         
00094 
00095         
00096 
00097         
00098 
00099 
00100 
00101 #include <ConversionException.h>
00102 #include <NoSuchRow.h>
00103 #include <IllegalAccessException.h>
00104 
00105 #include <RowTransformer.h>
00106 //#include <TableStreamReader.h>
00107 
00108 /*\file Scan.h
00109     \brief Generated from model's revision "1.64", branch "HEAD"
00110 */
00111 
00112 namespace asdm {
00113 
00114 //class asdm::ScanTable;
00115 
00116 
00117 // class asdm::ExecBlockRow;
00118 class ExecBlockRow;
00119         
00120 
00121 class ScanRow;
00122 typedef void (ScanRow::*ScanAttributeFromBin) (EndianIStream& eis);
00123 typedef void (ScanRow::*ScanAttributeFromText) (const string& s);
00124 
00131 class ScanRow {
00132 friend class asdm::ScanTable;
00133 friend class asdm::RowTransformer<ScanRow>;
00134 //friend class asdm::TableStreamReader<ScanTable, ScanRow>;
00135 
00136 public:
00137 
00138         virtual ~ScanRow();
00139 
00143         ScanTable &getTable() const;
00144         
00149         bool isAdded() const;
00150                 
00152         // Intrinsic Table Attributes //
00154         
00155         
00156         // ===> Attribute scanNumber
00157         
00158         
00159         
00160 
00161         
00166         int getScanNumber() const;
00167         
00168  
00169         
00170         
00180         void setScanNumber (int scanNumber);
00181                 
00182         
00183         
00184         
00185 
00186 
00187         
00188         // ===> Attribute startTime
00189         
00190         
00191         
00192 
00193         
00198         ArrayTime getStartTime() const;
00199         
00200  
00201         
00202         
00210         void setStartTime (ArrayTime startTime);
00211                 
00212         
00213         
00214         
00215 
00216 
00217         
00218         // ===> Attribute endTime
00219         
00220         
00221         
00222 
00223         
00228         ArrayTime getEndTime() const;
00229         
00230  
00231         
00232         
00240         void setEndTime (ArrayTime endTime);
00241                 
00242         
00243         
00244         
00245 
00246 
00247         
00248         // ===> Attribute numIntent
00249         
00250         
00251         
00252 
00253         
00258         int getNumIntent() const;
00259         
00260  
00261         
00262         
00270         void setNumIntent (int numIntent);
00271                 
00272         
00273         
00274         
00275 
00276 
00277         
00278         // ===> Attribute numSubscan
00279         
00280         
00281         
00282 
00283         
00288         int getNumSubscan() const;
00289         
00290  
00291         
00292         
00300         void setNumSubscan (int numSubscan);
00301                 
00302         
00303         
00304         
00305 
00306 
00307         
00308         // ===> Attribute scanIntent
00309         
00310         
00311         
00312 
00313         
00318         vector<ScanIntentMod::ScanIntent > getScanIntent() const;
00319         
00320  
00321         
00322         
00330         void setScanIntent (vector<ScanIntentMod::ScanIntent > scanIntent);
00331                 
00332         
00333         
00334         
00335 
00336 
00337         
00338         // ===> Attribute calDataType
00339         
00340         
00341         
00342 
00343         
00348         vector<CalDataOriginMod::CalDataOrigin > getCalDataType() const;
00349         
00350  
00351         
00352         
00360         void setCalDataType (vector<CalDataOriginMod::CalDataOrigin > calDataType);
00361                 
00362         
00363         
00364         
00365 
00366 
00367         
00368         // ===> Attribute calibrationOnLine
00369         
00370         
00371         
00372 
00373         
00378         vector<bool > getCalibrationOnLine() const;
00379         
00380  
00381         
00382         
00390         void setCalibrationOnLine (vector<bool > calibrationOnLine);
00391                 
00392         
00393         
00394         
00395 
00396 
00397         
00398         // ===> Attribute calibrationFunction, which is optional
00399         
00400         
00401         
00406         bool isCalibrationFunctionExists() const;
00407         
00408 
00409         
00415         vector<CalibrationFunctionMod::CalibrationFunction > getCalibrationFunction() const;
00416         
00417  
00418         
00419         
00426         void setCalibrationFunction (vector<CalibrationFunctionMod::CalibrationFunction > calibrationFunction);
00427                 
00428         
00429         
00430         
00434         void clearCalibrationFunction ();
00435         
00436 
00437 
00438         
00439         // ===> Attribute calibrationSet, which is optional
00440         
00441         
00442         
00447         bool isCalibrationSetExists() const;
00448         
00449 
00450         
00456         vector<CalibrationSetMod::CalibrationSet > getCalibrationSet() const;
00457         
00458  
00459         
00460         
00467         void setCalibrationSet (vector<CalibrationSetMod::CalibrationSet > calibrationSet);
00468                 
00469         
00470         
00471         
00475         void clearCalibrationSet ();
00476         
00477 
00478 
00479         
00480         // ===> Attribute calPattern, which is optional
00481         
00482         
00483         
00488         bool isCalPatternExists() const;
00489         
00490 
00491         
00497         vector<AntennaMotionPatternMod::AntennaMotionPattern > getCalPattern() const;
00498         
00499  
00500         
00501         
00508         void setCalPattern (vector<AntennaMotionPatternMod::AntennaMotionPattern > calPattern);
00509                 
00510         
00511         
00512         
00516         void clearCalPattern ();
00517         
00518 
00519 
00520         
00521         // ===> Attribute numField, which is optional
00522         
00523         
00524         
00529         bool isNumFieldExists() const;
00530         
00531 
00532         
00538         int getNumField() const;
00539         
00540  
00541         
00542         
00549         void setNumField (int numField);
00550                 
00551         
00552         
00553         
00557         void clearNumField ();
00558         
00559 
00560 
00561         
00562         // ===> Attribute fieldName, which is optional
00563         
00564         
00565         
00570         bool isFieldNameExists() const;
00571         
00572 
00573         
00579         vector<string > getFieldName() const;
00580         
00581  
00582         
00583         
00590         void setFieldName (vector<string > fieldName);
00591                 
00592         
00593         
00594         
00598         void clearFieldName ();
00599         
00600 
00601 
00602         
00603         // ===> Attribute sourceName, which is optional
00604         
00605         
00606         
00611         bool isSourceNameExists() const;
00612         
00613 
00614         
00620         string getSourceName() const;
00621         
00622  
00623         
00624         
00631         void setSourceName (string sourceName);
00632                 
00633         
00634         
00635         
00639         void clearSourceName ();
00640         
00641 
00642 
00644         // Extrinsic Table Attributes //
00646         
00647         
00648         // ===> Attribute execBlockId
00649         
00650         
00651         
00652 
00653         
00658         Tag getExecBlockId() const;
00659         
00660  
00661         
00662         
00672         void setExecBlockId (Tag execBlockId);
00673                 
00674         
00675         
00676         
00677 
00678 
00680         // Links //
00682         
00683         
00684 
00685         
00686                 
00693          ExecBlockRow* getExecBlockUsingExecBlockId();
00694          
00695 
00696         
00697 
00698         
00699         
00700         
00724         bool compareNoAutoInc(Tag execBlockId, int scanNumber, ArrayTime startTime, ArrayTime endTime, int numIntent, int numSubscan, vector<ScanIntentMod::ScanIntent > scanIntent, vector<CalDataOriginMod::CalDataOrigin > calDataType, vector<bool > calibrationOnLine);
00725         
00726         
00727 
00728         
00748         bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, int numIntent, int numSubscan, vector<ScanIntentMod::ScanIntent > scanIntent, vector<CalDataOriginMod::CalDataOrigin > calDataType, vector<bool > calibrationOnLine); 
00749                  
00750         
00759         bool equalByRequiredValue(ScanRow* x) ;
00760         
00761 #ifndef WITHOUT_ACS
00762 
00766         asdmIDL::ScanRowIDL *toIDL() const;
00767         
00775          void toIDL(asdmIDL::ScanRowIDL& x) const;
00776 #endif
00777         
00778 #ifndef WITHOUT_ACS
00779 
00784         void setFromIDL (asdmIDL::ScanRowIDL x) ;
00785 #endif
00786         
00791         std::string toXML() const;
00792 
00799         void setFromXML (std::string rowDoc) ;
00800 
00803         // binary-deserialization material from an EndianIStream  //
00805 
00806         std::map<std::string, ScanAttributeFromBin> fromBinMethods;
00807 void execBlockIdFromBin( EndianIStream& eis);
00808 void scanNumberFromBin( EndianIStream& eis);
00809 void startTimeFromBin( EndianIStream& eis);
00810 void endTimeFromBin( EndianIStream& eis);
00811 void numIntentFromBin( EndianIStream& eis);
00812 void numSubscanFromBin( EndianIStream& eis);
00813 void scanIntentFromBin( EndianIStream& eis);
00814 void calDataTypeFromBin( EndianIStream& eis);
00815 void calibrationOnLineFromBin( EndianIStream& eis);
00816 
00817 void calibrationFunctionFromBin( EndianIStream& eis);
00818 void calibrationSetFromBin( EndianIStream& eis);
00819 void calPatternFromBin( EndianIStream& eis);
00820 void numFieldFromBin( EndianIStream& eis);
00821 void fieldNameFromBin( EndianIStream& eis);
00822 void sourceNameFromBin( EndianIStream& eis);
00823 
00824 
00832          static ScanRow* fromBin(EndianIStream& eis, ScanTable& table, const std::vector<std::string>& attributesSeq);   
00833  
00840          void fromText(const std::string& attributeName, const std::string&  t);
00842 
00843 private:
00847         ScanTable &table;
00851         bool hasBeenAdded;
00852 
00853         // This method is used by the Table class when this row is added to the table.
00854         void isAdded(bool added);
00855 
00856 
00865         ScanRow (ScanTable &table);
00866 
00884          ScanRow (ScanTable &table, ScanRow &row);
00885                 
00887         // Intrinsic Table Attributes //
00889         
00890         
00891         // ===> Attribute scanNumber
00892         
00893         
00894 
00895         int scanNumber;
00896 
00897         
00898         
00899         
00900 
00901         
00902         // ===> Attribute startTime
00903         
00904         
00905 
00906         ArrayTime startTime;
00907 
00908         
00909         
00910         
00911 
00912         
00913         // ===> Attribute endTime
00914         
00915         
00916 
00917         ArrayTime endTime;
00918 
00919         
00920         
00921         
00922 
00923         
00924         // ===> Attribute numIntent
00925         
00926         
00927 
00928         int numIntent;
00929 
00930         
00931         
00932         
00933 
00934         
00935         // ===> Attribute numSubscan
00936         
00937         
00938 
00939         int numSubscan;
00940 
00941         
00942         
00943         
00944 
00945         
00946         // ===> Attribute scanIntent
00947         
00948         
00949 
00950         vector<ScanIntentMod::ScanIntent > scanIntent;
00951 
00952         
00953         
00954         
00955 
00956         
00957         // ===> Attribute calDataType
00958         
00959         
00960 
00961         vector<CalDataOriginMod::CalDataOrigin > calDataType;
00962 
00963         
00964         
00965         
00966 
00967         
00968         // ===> Attribute calibrationOnLine
00969         
00970         
00971 
00972         vector<bool > calibrationOnLine;
00973 
00974         
00975         
00976         
00977 
00978         
00979         // ===> Attribute calibrationFunction, which is optional
00980         
00981         
00982         bool calibrationFunctionExists;
00983         
00984 
00985         vector<CalibrationFunctionMod::CalibrationFunction > calibrationFunction;
00986 
00987         
00988         
00989         
00990 
00991         
00992         // ===> Attribute calibrationSet, which is optional
00993         
00994         
00995         bool calibrationSetExists;
00996         
00997 
00998         vector<CalibrationSetMod::CalibrationSet > calibrationSet;
00999 
01000         
01001         
01002         
01003 
01004         
01005         // ===> Attribute calPattern, which is optional
01006         
01007         
01008         bool calPatternExists;
01009         
01010 
01011         vector<AntennaMotionPatternMod::AntennaMotionPattern > calPattern;
01012 
01013         
01014         
01015         
01016 
01017         
01018         // ===> Attribute numField, which is optional
01019         
01020         
01021         bool numFieldExists;
01022         
01023 
01024         int numField;
01025 
01026         
01027         
01028         
01029 
01030         
01031         // ===> Attribute fieldName, which is optional
01032         
01033         
01034         bool fieldNameExists;
01035         
01036 
01037         vector<string > fieldName;
01038 
01039         
01040         
01041         
01042 
01043         
01044         // ===> Attribute sourceName, which is optional
01045         
01046         
01047         bool sourceNameExists;
01048         
01049 
01050         string sourceName;
01051 
01052         
01053         
01054         
01055 
01057         // Extrinsic Table Attributes //
01059         
01060         
01061         // ===> Attribute execBlockId
01062         
01063         
01064 
01065         Tag execBlockId;
01066 
01067         
01068         
01069         
01070 
01072         // Links //
01074         
01075         
01076                 
01077 
01078          
01079 
01080         
01081 
01082         
01083 /*
01085         // binary-deserialization material from an EndianIStream  //
01087         std::map<std::string, ScanAttributeFromBin> fromBinMethods;
01088 void execBlockIdFromBin( EndianIStream& eis);
01089 void scanNumberFromBin( EndianIStream& eis);
01090 void startTimeFromBin( EndianIStream& eis);
01091 void endTimeFromBin( EndianIStream& eis);
01092 void numIntentFromBin( EndianIStream& eis);
01093 void numSubscanFromBin( EndianIStream& eis);
01094 void scanIntentFromBin( EndianIStream& eis);
01095 void calDataTypeFromBin( EndianIStream& eis);
01096 void calibrationOnLineFromBin( EndianIStream& eis);
01097 
01098 void calibrationFunctionFromBin( EndianIStream& eis);
01099 void calibrationSetFromBin( EndianIStream& eis);
01100 void calPatternFromBin( EndianIStream& eis);
01101 void numFieldFromBin( EndianIStream& eis);
01102 void fieldNameFromBin( EndianIStream& eis);
01103 void sourceNameFromBin( EndianIStream& eis);
01104 
01105 */
01106         
01108         // text-deserialization material //
01110         std::map<std::string, ScanAttributeFromText> fromTextMethods;
01111         
01112 void execBlockIdFromText (const string & s);
01113         
01114         
01115 void scanNumberFromText (const string & s);
01116         
01117         
01118 void startTimeFromText (const string & s);
01119         
01120         
01121 void endTimeFromText (const string & s);
01122         
01123         
01124 void numIntentFromText (const string & s);
01125         
01126         
01127 void numSubscanFromText (const string & s);
01128         
01129         
01130 void scanIntentFromText (const string & s);
01131         
01132         
01133 void calDataTypeFromText (const string & s);
01134         
01135         
01136 void calibrationOnLineFromText (const string & s);
01137         
01138 
01139         
01140 void calibrationFunctionFromText (const string & s);
01141         
01142         
01143 void calibrationSetFromText (const string & s);
01144         
01145         
01146 void calPatternFromText (const string & s);
01147         
01148         
01149 void numFieldFromText (const string & s);
01150         
01151         
01152 void fieldNameFromText (const string & s);
01153         
01154         
01155 void sourceNameFromText (const string & s);
01156         
01157         
01158         
01163          void toBin(EndianOSStream& eoss);
01164                  
01174 };
01175 
01176 } // End namespace asdm
01177 
01178 #endif /* Scan_CLASS */