casa  $Rev:20696$
PointingRow.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 PointingRow.h
00032  */
00033  
00034 #ifndef PointingRow_CLASS
00035 #define PointingRow_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 <Angle.h>
00056         
00057 
00058          
00059 #include <Tag.h>
00060         
00061 
00062          
00063 #include <ArrayTimeInterval.h>
00064         
00065 
00066 
00067 
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 #include "CDirectionReferenceCode.h"
00095         
00096 
00097         
00098 
00099         
00100 
00101         
00102 
00103 
00104 
00105 #include <ConversionException.h>
00106 #include <NoSuchRow.h>
00107 #include <IllegalAccessException.h>
00108 
00109 #include <RowTransformer.h>
00110 //#include <TableStreamReader.h>
00111 
00112 /*\file Pointing.h
00113     \brief Generated from model's revision "1.62", branch "HEAD"
00114 */
00115 
00116 namespace asdm {
00117 
00118 //class asdm::PointingTable;
00119 
00120 
00121 // class asdm::PointingModelRow;
00122 class PointingModelRow;
00123 
00124 // class asdm::AntennaRow;
00125 class AntennaRow;
00126         
00127 
00128 class PointingRow;
00129 typedef void (PointingRow::*PointingAttributeFromBin) (EndianIStream& eis);
00130 typedef void (PointingRow::*PointingAttributeFromText) (const string& s);
00131 
00138 class PointingRow {
00139 friend class asdm::PointingTable;
00140 friend class asdm::RowTransformer<PointingRow>;
00141 //friend class asdm::TableStreamReader<PointingTable, PointingRow>;
00142 
00143 public:
00144 
00145         virtual ~PointingRow();
00146 
00150         PointingTable &getTable() const;
00151         
00156         bool isAdded() const;
00157                 
00159         // Intrinsic Table Attributes //
00161         
00162         
00163         // ===> Attribute timeInterval
00164         
00165         
00166         
00167 
00168         
00173         ArrayTimeInterval getTimeInterval() const;
00174         
00175  
00176         
00177         
00187         void setTimeInterval (ArrayTimeInterval timeInterval);
00188                 
00189         
00190         
00191         
00192 
00193 
00194         
00195         // ===> Attribute numSample
00196         
00197         
00198         
00199 
00200         
00205         int getNumSample() const;
00206         
00207  
00208         
00209         
00217         void setNumSample (int numSample);
00218                 
00219         
00220         
00221         
00222 
00223 
00224         
00225         // ===> Attribute encoder
00226         
00227         
00228         
00229 
00230         
00235         vector<vector<Angle > > getEncoder() const;
00236         
00237  
00238         
00239         
00247         void setEncoder (vector<vector<Angle > > encoder);
00248                 
00249         
00250         
00251         
00252 
00253 
00254         
00255         // ===> Attribute pointingTracking
00256         
00257         
00258         
00259 
00260         
00265         bool getPointingTracking() const;
00266         
00267  
00268         
00269         
00277         void setPointingTracking (bool pointingTracking);
00278                 
00279         
00280         
00281         
00282 
00283 
00284         
00285         // ===> Attribute usePolynomials
00286         
00287         
00288         
00289 
00290         
00295         bool getUsePolynomials() const;
00296         
00297  
00298         
00299         
00307         void setUsePolynomials (bool usePolynomials);
00308                 
00309         
00310         
00311         
00312 
00313 
00314         
00315         // ===> Attribute timeOrigin
00316         
00317         
00318         
00319 
00320         
00325         ArrayTime getTimeOrigin() const;
00326         
00327  
00328         
00329         
00337         void setTimeOrigin (ArrayTime timeOrigin);
00338                 
00339         
00340         
00341         
00342 
00343 
00344         
00345         // ===> Attribute numTerm
00346         
00347         
00348         
00349 
00350         
00355         int getNumTerm() const;
00356         
00357  
00358         
00359         
00367         void setNumTerm (int numTerm);
00368                 
00369         
00370         
00371         
00372 
00373 
00374         
00375         // ===> Attribute pointingDirection
00376         
00377         
00378         
00379 
00380         
00385         vector<vector<Angle > > getPointingDirection() const;
00386         
00387  
00388         
00389         
00397         void setPointingDirection (vector<vector<Angle > > pointingDirection);
00398                 
00399         
00400         
00401         
00402 
00403 
00404         
00405         // ===> Attribute target
00406         
00407         
00408         
00409 
00410         
00415         vector<vector<Angle > > getTarget() const;
00416         
00417  
00418         
00419         
00427         void setTarget (vector<vector<Angle > > target);
00428                 
00429         
00430         
00431         
00432 
00433 
00434         
00435         // ===> Attribute offset
00436         
00437         
00438         
00439 
00440         
00445         vector<vector<Angle > > getOffset() const;
00446         
00447  
00448         
00449         
00457         void setOffset (vector<vector<Angle > > offset);
00458                 
00459         
00460         
00461         
00462 
00463 
00464         
00465         // ===> Attribute overTheTop, which is optional
00466         
00467         
00468         
00473         bool isOverTheTopExists() const;
00474         
00475 
00476         
00482         bool getOverTheTop() const;
00483         
00484  
00485         
00486         
00493         void setOverTheTop (bool overTheTop);
00494                 
00495         
00496         
00497         
00501         void clearOverTheTop ();
00502         
00503 
00504 
00505         
00506         // ===> Attribute sourceOffset, which is optional
00507         
00508         
00509         
00514         bool isSourceOffsetExists() const;
00515         
00516 
00517         
00523         vector<vector<Angle > > getSourceOffset() const;
00524         
00525  
00526         
00527         
00534         void setSourceOffset (vector<vector<Angle > > sourceOffset);
00535                 
00536         
00537         
00538         
00542         void clearSourceOffset ();
00543         
00544 
00545 
00546         
00547         // ===> Attribute sourceOffsetReferenceCode, which is optional
00548         
00549         
00550         
00555         bool isSourceOffsetReferenceCodeExists() const;
00556         
00557 
00558         
00564         DirectionReferenceCodeMod::DirectionReferenceCode getSourceOffsetReferenceCode() const;
00565         
00566  
00567         
00568         
00575         void setSourceOffsetReferenceCode (DirectionReferenceCodeMod::DirectionReferenceCode sourceOffsetReferenceCode);
00576                 
00577         
00578         
00579         
00583         void clearSourceOffsetReferenceCode ();
00584         
00585 
00586 
00587         
00588         // ===> Attribute sourceOffsetEquinox, which is optional
00589         
00590         
00591         
00596         bool isSourceOffsetEquinoxExists() const;
00597         
00598 
00599         
00605         ArrayTime getSourceOffsetEquinox() const;
00606         
00607  
00608         
00609         
00616         void setSourceOffsetEquinox (ArrayTime sourceOffsetEquinox);
00617                 
00618         
00619         
00620         
00624         void clearSourceOffsetEquinox ();
00625         
00626 
00627 
00628         
00629         // ===> Attribute sampledTimeInterval, which is optional
00630         
00631         
00632         
00637         bool isSampledTimeIntervalExists() const;
00638         
00639 
00640         
00646         vector<ArrayTimeInterval > getSampledTimeInterval() const;
00647         
00648  
00649         
00650         
00657         void setSampledTimeInterval (vector<ArrayTimeInterval > sampledTimeInterval);
00658                 
00659         
00660         
00661         
00665         void clearSampledTimeInterval ();
00666         
00667 
00668 
00669         
00670         // ===> Attribute atmosphericCorrection, which is optional
00671         
00672         
00673         
00678         bool isAtmosphericCorrectionExists() const;
00679         
00680 
00681         
00687         vector<vector<Angle > > getAtmosphericCorrection() const;
00688         
00689  
00690         
00691         
00698         void setAtmosphericCorrection (vector<vector<Angle > > atmosphericCorrection);
00699                 
00700         
00701         
00702         
00706         void clearAtmosphericCorrection ();
00707         
00708 
00709 
00711         // Extrinsic Table Attributes //
00713         
00714         
00715         // ===> Attribute antennaId
00716         
00717         
00718         
00719 
00720         
00725         Tag getAntennaId() const;
00726         
00727  
00728         
00729         
00739         void setAntennaId (Tag antennaId);
00740                 
00741         
00742         
00743         
00744 
00745 
00746         
00747         // ===> Attribute pointingModelId
00748         
00749         
00750         
00751 
00752         
00757         int getPointingModelId() const;
00758         
00759  
00760         
00761         
00769         void setPointingModelId (int pointingModelId);
00770                 
00771         
00772         
00773         
00774 
00775 
00777         // Links //
00779         
00780         
00781 
00782         
00783                 
00784         // ===> Slice link from a row of Pointing table to a collection of row of PointingModel table.
00785         
00791         vector <PointingModelRow *> getPointingModels();
00792         
00793         
00794 
00795         
00796 
00797         
00798 
00799         
00800                 
00807          AntennaRow* getAntennaUsingAntennaId();
00808          
00809 
00810         
00811 
00812         
00813         
00814         
00844         bool compareNoAutoInc(Tag antennaId, ArrayTimeInterval timeInterval, int numSample, vector<vector<Angle > > encoder, bool pointingTracking, bool usePolynomials, ArrayTime timeOrigin, int numTerm, vector<vector<Angle > > pointingDirection, vector<vector<Angle > > target, vector<vector<Angle > > offset, int pointingModelId);
00845         
00846         
00847 
00848         
00874         bool compareRequiredValue(int numSample, vector<vector<Angle > > encoder, bool pointingTracking, bool usePolynomials, ArrayTime timeOrigin, int numTerm, vector<vector<Angle > > pointingDirection, vector<vector<Angle > > target, vector<vector<Angle > > offset, int pointingModelId); 
00875                  
00876         
00885         bool equalByRequiredValue(PointingRow* x) ;
00886         
00887 #ifndef WITHOUT_ACS
00888 
00892         asdmIDL::PointingRowIDL *toIDL() const;
00893 #endif
00894         
00895 #ifndef WITHOUT_ACS
00896 
00901         void setFromIDL (asdmIDL::PointingRowIDL x) ;
00902 #endif
00903         
00908         std::string toXML() const;
00909 
00916         void setFromXML (std::string rowDoc) ;
00917 
00920         // binary-deserialization material from an EndianIStream  //
00922 
00923         std::map<std::string, PointingAttributeFromBin> fromBinMethods;
00924 void antennaIdFromBin( EndianIStream& eis);
00925 void timeIntervalFromBin( EndianIStream& eis);
00926 void numSampleFromBin( EndianIStream& eis);
00927 void encoderFromBin( EndianIStream& eis);
00928 void pointingTrackingFromBin( EndianIStream& eis);
00929 void usePolynomialsFromBin( EndianIStream& eis);
00930 void timeOriginFromBin( EndianIStream& eis);
00931 void numTermFromBin( EndianIStream& eis);
00932 void pointingDirectionFromBin( EndianIStream& eis);
00933 void targetFromBin( EndianIStream& eis);
00934 void offsetFromBin( EndianIStream& eis);
00935 void pointingModelIdFromBin( EndianIStream& eis);
00936 
00937 void overTheTopFromBin( EndianIStream& eis);
00938 void sourceOffsetFromBin( EndianIStream& eis);
00939 void sourceOffsetReferenceCodeFromBin( EndianIStream& eis);
00940 void sourceOffsetEquinoxFromBin( EndianIStream& eis);
00941 void sampledTimeIntervalFromBin( EndianIStream& eis);
00942 void atmosphericCorrectionFromBin( EndianIStream& eis);
00943 
00944 
00952          static PointingRow* fromBin(EndianIStream& eis, PointingTable& table, const std::vector<std::string>& attributesSeq);   
00953  
00960          void fromText(const std::string& attributeName, const std::string&  t);
00962 
00963 private:
00967         PointingTable &table;
00971         bool hasBeenAdded;
00972 
00973         // This method is used by the Table class when this row is added to the table.
00974         void isAdded(bool added);
00975 
00976 
00985         PointingRow (PointingTable &table);
00986 
01004          PointingRow (PointingTable &table, PointingRow &row);
01005                 
01007         // Intrinsic Table Attributes //
01009         
01010         
01011         // ===> Attribute timeInterval
01012         
01013         
01014 
01015         ArrayTimeInterval timeInterval;
01016 
01017         
01018         
01019         
01020 
01021         
01022         // ===> Attribute numSample
01023         
01024         
01025 
01026         int numSample;
01027 
01028         
01029         
01030         
01031 
01032         
01033         // ===> Attribute encoder
01034         
01035         
01036 
01037         vector<vector<Angle > > encoder;
01038 
01039         
01040         
01041         
01042 
01043         
01044         // ===> Attribute pointingTracking
01045         
01046         
01047 
01048         bool pointingTracking;
01049 
01050         
01051         
01052         
01053 
01054         
01055         // ===> Attribute usePolynomials
01056         
01057         
01058 
01059         bool usePolynomials;
01060 
01061         
01062         
01063         
01064 
01065         
01066         // ===> Attribute timeOrigin
01067         
01068         
01069 
01070         ArrayTime timeOrigin;
01071 
01072         
01073         
01074         
01075 
01076         
01077         // ===> Attribute numTerm
01078         
01079         
01080 
01081         int numTerm;
01082 
01083         
01084         
01085         
01086 
01087         
01088         // ===> Attribute pointingDirection
01089         
01090         
01091 
01092         vector<vector<Angle > > pointingDirection;
01093 
01094         
01095         
01096         
01097 
01098         
01099         // ===> Attribute target
01100         
01101         
01102 
01103         vector<vector<Angle > > target;
01104 
01105         
01106         
01107         
01108 
01109         
01110         // ===> Attribute offset
01111         
01112         
01113 
01114         vector<vector<Angle > > offset;
01115 
01116         
01117         
01118         
01119 
01120         
01121         // ===> Attribute overTheTop, which is optional
01122         
01123         
01124         bool overTheTopExists;
01125         
01126 
01127         bool overTheTop;
01128 
01129         
01130         
01131         
01132 
01133         
01134         // ===> Attribute sourceOffset, which is optional
01135         
01136         
01137         bool sourceOffsetExists;
01138         
01139 
01140         vector<vector<Angle > > sourceOffset;
01141 
01142         
01143         
01144         
01145 
01146         
01147         // ===> Attribute sourceOffsetReferenceCode, which is optional
01148         
01149         
01150         bool sourceOffsetReferenceCodeExists;
01151         
01152 
01153         DirectionReferenceCodeMod::DirectionReferenceCode sourceOffsetReferenceCode;
01154 
01155         
01156         
01157         
01158 
01159         
01160         // ===> Attribute sourceOffsetEquinox, which is optional
01161         
01162         
01163         bool sourceOffsetEquinoxExists;
01164         
01165 
01166         ArrayTime sourceOffsetEquinox;
01167 
01168         
01169         
01170         
01171 
01172         
01173         // ===> Attribute sampledTimeInterval, which is optional
01174         
01175         
01176         bool sampledTimeIntervalExists;
01177         
01178 
01179         vector<ArrayTimeInterval > sampledTimeInterval;
01180 
01181         
01182         
01183         
01184 
01185         
01186         // ===> Attribute atmosphericCorrection, which is optional
01187         
01188         
01189         bool atmosphericCorrectionExists;
01190         
01191 
01192         vector<vector<Angle > > atmosphericCorrection;
01193 
01194         
01195         
01196         
01197 
01199         // Extrinsic Table Attributes //
01201         
01202         
01203         // ===> Attribute antennaId
01204         
01205         
01206 
01207         Tag antennaId;
01208 
01209         
01210         
01211         
01212 
01213         
01214         // ===> Attribute pointingModelId
01215         
01216         
01217 
01218         int pointingModelId;
01219 
01220         
01221         
01222         
01223 
01225         // Links //
01227         
01228         
01229                 
01230 
01231 
01232         
01233 
01234         
01235                 
01236 
01237          
01238 
01239         
01240 
01241         
01242 /*
01244         // binary-deserialization material from an EndianIStream  //
01246         std::map<std::string, PointingAttributeFromBin> fromBinMethods;
01247 void antennaIdFromBin( EndianIStream& eis);
01248 void timeIntervalFromBin( EndianIStream& eis);
01249 void numSampleFromBin( EndianIStream& eis);
01250 void encoderFromBin( EndianIStream& eis);
01251 void pointingTrackingFromBin( EndianIStream& eis);
01252 void usePolynomialsFromBin( EndianIStream& eis);
01253 void timeOriginFromBin( EndianIStream& eis);
01254 void numTermFromBin( EndianIStream& eis);
01255 void pointingDirectionFromBin( EndianIStream& eis);
01256 void targetFromBin( EndianIStream& eis);
01257 void offsetFromBin( EndianIStream& eis);
01258 void pointingModelIdFromBin( EndianIStream& eis);
01259 
01260 void overTheTopFromBin( EndianIStream& eis);
01261 void sourceOffsetFromBin( EndianIStream& eis);
01262 void sourceOffsetReferenceCodeFromBin( EndianIStream& eis);
01263 void sourceOffsetEquinoxFromBin( EndianIStream& eis);
01264 void sampledTimeIntervalFromBin( EndianIStream& eis);
01265 void atmosphericCorrectionFromBin( EndianIStream& eis);
01266 
01267 */
01268         
01270         // text-deserialization material //
01272         std::map<std::string, PointingAttributeFromText> fromTextMethods;
01273         
01274 void antennaIdFromText (const string & s);
01275         
01276         
01277 void timeIntervalFromText (const string & s);
01278         
01279         
01280 void numSampleFromText (const string & s);
01281         
01282         
01283 void encoderFromText (const string & s);
01284         
01285         
01286 void pointingTrackingFromText (const string & s);
01287         
01288         
01289 void usePolynomialsFromText (const string & s);
01290         
01291         
01292 void timeOriginFromText (const string & s);
01293         
01294         
01295 void numTermFromText (const string & s);
01296         
01297         
01298 void pointingDirectionFromText (const string & s);
01299         
01300         
01301 void targetFromText (const string & s);
01302         
01303         
01304 void offsetFromText (const string & s);
01305         
01306         
01307 void pointingModelIdFromText (const string & s);
01308         
01309 
01310         
01311 void overTheTopFromText (const string & s);
01312         
01313         
01314 void sourceOffsetFromText (const string & s);
01315         
01316         
01317 void sourceOffsetReferenceCodeFromText (const string & s);
01318         
01319         
01320 void sourceOffsetEquinoxFromText (const string & s);
01321         
01322         
01323 void sampledTimeIntervalFromText (const string & s);
01324         
01325         
01326 void atmosphericCorrectionFromText (const string & s);
01327         
01328         
01329         
01334          void toBin(EndianOSStream& eoss);
01335                  
01345 };
01346 
01347 } // End namespace asdm
01348 
01349 #endif /* Pointing_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines