casa  $Rev:20696$
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.62", 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 #endif
00768         
00769 #ifndef WITHOUT_ACS
00770 
00775         void setFromIDL (asdmIDL::ScanRowIDL x) ;
00776 #endif
00777         
00782         std::string toXML() const;
00783 
00790         void setFromXML (std::string rowDoc) ;
00791 
00794         // binary-deserialization material from an EndianIStream  //
00796 
00797         std::map<std::string, ScanAttributeFromBin> fromBinMethods;
00798 void execBlockIdFromBin( EndianIStream& eis);
00799 void scanNumberFromBin( EndianIStream& eis);
00800 void startTimeFromBin( EndianIStream& eis);
00801 void endTimeFromBin( EndianIStream& eis);
00802 void numIntentFromBin( EndianIStream& eis);
00803 void numSubscanFromBin( EndianIStream& eis);
00804 void scanIntentFromBin( EndianIStream& eis);
00805 void calDataTypeFromBin( EndianIStream& eis);
00806 void calibrationOnLineFromBin( EndianIStream& eis);
00807 
00808 void calibrationFunctionFromBin( EndianIStream& eis);
00809 void calibrationSetFromBin( EndianIStream& eis);
00810 void calPatternFromBin( EndianIStream& eis);
00811 void numFieldFromBin( EndianIStream& eis);
00812 void fieldNameFromBin( EndianIStream& eis);
00813 void sourceNameFromBin( EndianIStream& eis);
00814 
00815 
00823          static ScanRow* fromBin(EndianIStream& eis, ScanTable& table, const std::vector<std::string>& attributesSeq);   
00824  
00831          void fromText(const std::string& attributeName, const std::string&  t);
00833 
00834 private:
00838         ScanTable &table;
00842         bool hasBeenAdded;
00843 
00844         // This method is used by the Table class when this row is added to the table.
00845         void isAdded(bool added);
00846 
00847 
00856         ScanRow (ScanTable &table);
00857 
00875          ScanRow (ScanTable &table, ScanRow &row);
00876                 
00878         // Intrinsic Table Attributes //
00880         
00881         
00882         // ===> Attribute scanNumber
00883         
00884         
00885 
00886         int scanNumber;
00887 
00888         
00889         
00890         
00891 
00892         
00893         // ===> Attribute startTime
00894         
00895         
00896 
00897         ArrayTime startTime;
00898 
00899         
00900         
00901         
00902 
00903         
00904         // ===> Attribute endTime
00905         
00906         
00907 
00908         ArrayTime endTime;
00909 
00910         
00911         
00912         
00913 
00914         
00915         // ===> Attribute numIntent
00916         
00917         
00918 
00919         int numIntent;
00920 
00921         
00922         
00923         
00924 
00925         
00926         // ===> Attribute numSubscan
00927         
00928         
00929 
00930         int numSubscan;
00931 
00932         
00933         
00934         
00935 
00936         
00937         // ===> Attribute scanIntent
00938         
00939         
00940 
00941         vector<ScanIntentMod::ScanIntent > scanIntent;
00942 
00943         
00944         
00945         
00946 
00947         
00948         // ===> Attribute calDataType
00949         
00950         
00951 
00952         vector<CalDataOriginMod::CalDataOrigin > calDataType;
00953 
00954         
00955         
00956         
00957 
00958         
00959         // ===> Attribute calibrationOnLine
00960         
00961         
00962 
00963         vector<bool > calibrationOnLine;
00964 
00965         
00966         
00967         
00968 
00969         
00970         // ===> Attribute calibrationFunction, which is optional
00971         
00972         
00973         bool calibrationFunctionExists;
00974         
00975 
00976         vector<CalibrationFunctionMod::CalibrationFunction > calibrationFunction;
00977 
00978         
00979         
00980         
00981 
00982         
00983         // ===> Attribute calibrationSet, which is optional
00984         
00985         
00986         bool calibrationSetExists;
00987         
00988 
00989         vector<CalibrationSetMod::CalibrationSet > calibrationSet;
00990 
00991         
00992         
00993         
00994 
00995         
00996         // ===> Attribute calPattern, which is optional
00997         
00998         
00999         bool calPatternExists;
01000         
01001 
01002         vector<AntennaMotionPatternMod::AntennaMotionPattern > calPattern;
01003 
01004         
01005         
01006         
01007 
01008         
01009         // ===> Attribute numField, which is optional
01010         
01011         
01012         bool numFieldExists;
01013         
01014 
01015         int numField;
01016 
01017         
01018         
01019         
01020 
01021         
01022         // ===> Attribute fieldName, which is optional
01023         
01024         
01025         bool fieldNameExists;
01026         
01027 
01028         vector<string > fieldName;
01029 
01030         
01031         
01032         
01033 
01034         
01035         // ===> Attribute sourceName, which is optional
01036         
01037         
01038         bool sourceNameExists;
01039         
01040 
01041         string sourceName;
01042 
01043         
01044         
01045         
01046 
01048         // Extrinsic Table Attributes //
01050         
01051         
01052         // ===> Attribute execBlockId
01053         
01054         
01055 
01056         Tag execBlockId;
01057 
01058         
01059         
01060         
01061 
01063         // Links //
01065         
01066         
01067                 
01068 
01069          
01070 
01071         
01072 
01073         
01074 /*
01076         // binary-deserialization material from an EndianIStream  //
01078         std::map<std::string, ScanAttributeFromBin> fromBinMethods;
01079 void execBlockIdFromBin( EndianIStream& eis);
01080 void scanNumberFromBin( EndianIStream& eis);
01081 void startTimeFromBin( EndianIStream& eis);
01082 void endTimeFromBin( EndianIStream& eis);
01083 void numIntentFromBin( EndianIStream& eis);
01084 void numSubscanFromBin( EndianIStream& eis);
01085 void scanIntentFromBin( EndianIStream& eis);
01086 void calDataTypeFromBin( EndianIStream& eis);
01087 void calibrationOnLineFromBin( EndianIStream& eis);
01088 
01089 void calibrationFunctionFromBin( EndianIStream& eis);
01090 void calibrationSetFromBin( EndianIStream& eis);
01091 void calPatternFromBin( EndianIStream& eis);
01092 void numFieldFromBin( EndianIStream& eis);
01093 void fieldNameFromBin( EndianIStream& eis);
01094 void sourceNameFromBin( EndianIStream& eis);
01095 
01096 */
01097         
01099         // text-deserialization material //
01101         std::map<std::string, ScanAttributeFromText> fromTextMethods;
01102         
01103 void execBlockIdFromText (const string & s);
01104         
01105         
01106 void scanNumberFromText (const string & s);
01107         
01108         
01109 void startTimeFromText (const string & s);
01110         
01111         
01112 void endTimeFromText (const string & s);
01113         
01114         
01115 void numIntentFromText (const string & s);
01116         
01117         
01118 void numSubscanFromText (const string & s);
01119         
01120         
01121 void scanIntentFromText (const string & s);
01122         
01123         
01124 void calDataTypeFromText (const string & s);
01125         
01126         
01127 void calibrationOnLineFromText (const string & s);
01128         
01129 
01130         
01131 void calibrationFunctionFromText (const string & s);
01132         
01133         
01134 void calibrationSetFromText (const string & s);
01135         
01136         
01137 void calPatternFromText (const string & s);
01138         
01139         
01140 void numFieldFromText (const string & s);
01141         
01142         
01143 void fieldNameFromText (const string & s);
01144         
01145         
01146 void sourceNameFromText (const string & s);
01147         
01148         
01149         
01154          void toBin(EndianOSStream& eoss);
01155                  
01165 };
01166 
01167 } // End namespace asdm
01168 
01169 #endif /* Scan_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines