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.61", 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);   
00825 
00826 private:
00830         ScanTable &table;
00834         bool hasBeenAdded;
00835 
00836         // This method is used by the Table class when this row is added to the table.
00837         void isAdded(bool added);
00838 
00839 
00848         ScanRow (ScanTable &table);
00849 
00867          ScanRow (ScanTable &table, ScanRow &row);
00868                 
00870         // Intrinsic Table Attributes //
00872         
00873         
00874         // ===> Attribute scanNumber
00875         
00876         
00877 
00878         int scanNumber;
00879 
00880         
00881         
00882         
00883 
00884         
00885         // ===> Attribute startTime
00886         
00887         
00888 
00889         ArrayTime startTime;
00890 
00891         
00892         
00893         
00894 
00895         
00896         // ===> Attribute endTime
00897         
00898         
00899 
00900         ArrayTime endTime;
00901 
00902         
00903         
00904         
00905 
00906         
00907         // ===> Attribute numIntent
00908         
00909         
00910 
00911         int numIntent;
00912 
00913         
00914         
00915         
00916 
00917         
00918         // ===> Attribute numSubscan
00919         
00920         
00921 
00922         int numSubscan;
00923 
00924         
00925         
00926         
00927 
00928         
00929         // ===> Attribute scanIntent
00930         
00931         
00932 
00933         vector<ScanIntentMod::ScanIntent > scanIntent;
00934 
00935         
00936         
00937         
00938 
00939         
00940         // ===> Attribute calDataType
00941         
00942         
00943 
00944         vector<CalDataOriginMod::CalDataOrigin > calDataType;
00945 
00946         
00947         
00948         
00949 
00950         
00951         // ===> Attribute calibrationOnLine
00952         
00953         
00954 
00955         vector<bool > calibrationOnLine;
00956 
00957         
00958         
00959         
00960 
00961         
00962         // ===> Attribute calibrationFunction, which is optional
00963         
00964         
00965         bool calibrationFunctionExists;
00966         
00967 
00968         vector<CalibrationFunctionMod::CalibrationFunction > calibrationFunction;
00969 
00970         
00971         
00972         
00973 
00974         
00975         // ===> Attribute calibrationSet, which is optional
00976         
00977         
00978         bool calibrationSetExists;
00979         
00980 
00981         vector<CalibrationSetMod::CalibrationSet > calibrationSet;
00982 
00983         
00984         
00985         
00986 
00987         
00988         // ===> Attribute calPattern, which is optional
00989         
00990         
00991         bool calPatternExists;
00992         
00993 
00994         vector<AntennaMotionPatternMod::AntennaMotionPattern > calPattern;
00995 
00996         
00997         
00998         
00999 
01000         
01001         // ===> Attribute numField, which is optional
01002         
01003         
01004         bool numFieldExists;
01005         
01006 
01007         int numField;
01008 
01009         
01010         
01011         
01012 
01013         
01014         // ===> Attribute fieldName, which is optional
01015         
01016         
01017         bool fieldNameExists;
01018         
01019 
01020         vector<string > fieldName;
01021 
01022         
01023         
01024         
01025 
01026         
01027         // ===> Attribute sourceName, which is optional
01028         
01029         
01030         bool sourceNameExists;
01031         
01032 
01033         string sourceName;
01034 
01035         
01036         
01037         
01038 
01040         // Extrinsic Table Attributes //
01042         
01043         
01044         // ===> Attribute execBlockId
01045         
01046         
01047 
01048         Tag execBlockId;
01049 
01050         
01051         
01052         
01053 
01055         // Links //
01057         
01058         
01059                 
01060 
01061          
01062 
01063         
01064 
01065         
01066 /*
01068         // binary-deserialization material from an EndianIStream  //
01070         std::map<std::string, ScanAttributeFromBin> fromBinMethods;
01071 void execBlockIdFromBin( EndianIStream& eis);
01072 void scanNumberFromBin( EndianIStream& eis);
01073 void startTimeFromBin( EndianIStream& eis);
01074 void endTimeFromBin( EndianIStream& eis);
01075 void numIntentFromBin( EndianIStream& eis);
01076 void numSubscanFromBin( EndianIStream& eis);
01077 void scanIntentFromBin( EndianIStream& eis);
01078 void calDataTypeFromBin( EndianIStream& eis);
01079 void calibrationOnLineFromBin( EndianIStream& eis);
01080 
01081 void calibrationFunctionFromBin( EndianIStream& eis);
01082 void calibrationSetFromBin( EndianIStream& eis);
01083 void calPatternFromBin( EndianIStream& eis);
01084 void numFieldFromBin( EndianIStream& eis);
01085 void fieldNameFromBin( EndianIStream& eis);
01086 void sourceNameFromBin( EndianIStream& eis);
01087 
01088 */
01089         
01091         // text-deserialization material //
01093         std::map<std::string, ScanAttributeFromText> fromTextMethods;
01094         
01095 void execBlockIdFromText (const string & s);
01096         
01097         
01098 void scanNumberFromText (const string & s);
01099         
01100         
01101 void startTimeFromText (const string & s);
01102         
01103         
01104 void endTimeFromText (const string & s);
01105         
01106         
01107 void numIntentFromText (const string & s);
01108         
01109         
01110 void numSubscanFromText (const string & s);
01111         
01112         
01113 void scanIntentFromText (const string & s);
01114         
01115         
01116 void calDataTypeFromText (const string & s);
01117         
01118         
01119 void calibrationOnLineFromText (const string & s);
01120         
01121 
01122         
01123 void calibrationFunctionFromText (const string & s);
01124         
01125         
01126 void calibrationSetFromText (const string & s);
01127         
01128         
01129 void calPatternFromText (const string & s);
01130         
01131         
01132 void numFieldFromText (const string & s);
01133         
01134         
01135 void fieldNameFromText (const string & s);
01136         
01137         
01138 void sourceNameFromText (const string & s);
01139         
01140         
01141         
01142         void fromText(const std::string& attributeName, const std::string&  t);
01143         
01148          void toBin(EndianOSStream& eoss);
01149                  
01159 };
01160 
01161 } // End namespace asdm
01162 
01163 #endif /* Scan_CLASS */