casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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.61", 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);   
00954 
00955 private:
00959         PointingTable &table;
00963         bool hasBeenAdded;
00964 
00965         // This method is used by the Table class when this row is added to the table.
00966         void isAdded(bool added);
00967 
00968 
00977         PointingRow (PointingTable &table);
00978 
00996          PointingRow (PointingTable &table, PointingRow &row);
00997                 
00999         // Intrinsic Table Attributes //
01001         
01002         
01003         // ===> Attribute timeInterval
01004         
01005         
01006 
01007         ArrayTimeInterval timeInterval;
01008 
01009         
01010         
01011         
01012 
01013         
01014         // ===> Attribute numSample
01015         
01016         
01017 
01018         int numSample;
01019 
01020         
01021         
01022         
01023 
01024         
01025         // ===> Attribute encoder
01026         
01027         
01028 
01029         vector<vector<Angle > > encoder;
01030 
01031         
01032         
01033         
01034 
01035         
01036         // ===> Attribute pointingTracking
01037         
01038         
01039 
01040         bool pointingTracking;
01041 
01042         
01043         
01044         
01045 
01046         
01047         // ===> Attribute usePolynomials
01048         
01049         
01050 
01051         bool usePolynomials;
01052 
01053         
01054         
01055         
01056 
01057         
01058         // ===> Attribute timeOrigin
01059         
01060         
01061 
01062         ArrayTime timeOrigin;
01063 
01064         
01065         
01066         
01067 
01068         
01069         // ===> Attribute numTerm
01070         
01071         
01072 
01073         int numTerm;
01074 
01075         
01076         
01077         
01078 
01079         
01080         // ===> Attribute pointingDirection
01081         
01082         
01083 
01084         vector<vector<Angle > > pointingDirection;
01085 
01086         
01087         
01088         
01089 
01090         
01091         // ===> Attribute target
01092         
01093         
01094 
01095         vector<vector<Angle > > target;
01096 
01097         
01098         
01099         
01100 
01101         
01102         // ===> Attribute offset
01103         
01104         
01105 
01106         vector<vector<Angle > > offset;
01107 
01108         
01109         
01110         
01111 
01112         
01113         // ===> Attribute overTheTop, which is optional
01114         
01115         
01116         bool overTheTopExists;
01117         
01118 
01119         bool overTheTop;
01120 
01121         
01122         
01123         
01124 
01125         
01126         // ===> Attribute sourceOffset, which is optional
01127         
01128         
01129         bool sourceOffsetExists;
01130         
01131 
01132         vector<vector<Angle > > sourceOffset;
01133 
01134         
01135         
01136         
01137 
01138         
01139         // ===> Attribute sourceOffsetReferenceCode, which is optional
01140         
01141         
01142         bool sourceOffsetReferenceCodeExists;
01143         
01144 
01145         DirectionReferenceCodeMod::DirectionReferenceCode sourceOffsetReferenceCode;
01146 
01147         
01148         
01149         
01150 
01151         
01152         // ===> Attribute sourceOffsetEquinox, which is optional
01153         
01154         
01155         bool sourceOffsetEquinoxExists;
01156         
01157 
01158         ArrayTime sourceOffsetEquinox;
01159 
01160         
01161         
01162         
01163 
01164         
01165         // ===> Attribute sampledTimeInterval, which is optional
01166         
01167         
01168         bool sampledTimeIntervalExists;
01169         
01170 
01171         vector<ArrayTimeInterval > sampledTimeInterval;
01172 
01173         
01174         
01175         
01176 
01177         
01178         // ===> Attribute atmosphericCorrection, which is optional
01179         
01180         
01181         bool atmosphericCorrectionExists;
01182         
01183 
01184         vector<vector<Angle > > atmosphericCorrection;
01185 
01186         
01187         
01188         
01189 
01191         // Extrinsic Table Attributes //
01193         
01194         
01195         // ===> Attribute antennaId
01196         
01197         
01198 
01199         Tag antennaId;
01200 
01201         
01202         
01203         
01204 
01205         
01206         // ===> Attribute pointingModelId
01207         
01208         
01209 
01210         int pointingModelId;
01211 
01212         
01213         
01214         
01215 
01217         // Links //
01219         
01220         
01221                 
01222 
01223 
01224         
01225 
01226         
01227                 
01228 
01229          
01230 
01231         
01232 
01233         
01234 /*
01236         // binary-deserialization material from an EndianIStream  //
01238         std::map<std::string, PointingAttributeFromBin> fromBinMethods;
01239 void antennaIdFromBin( EndianIStream& eis);
01240 void timeIntervalFromBin( EndianIStream& eis);
01241 void numSampleFromBin( EndianIStream& eis);
01242 void encoderFromBin( EndianIStream& eis);
01243 void pointingTrackingFromBin( EndianIStream& eis);
01244 void usePolynomialsFromBin( EndianIStream& eis);
01245 void timeOriginFromBin( EndianIStream& eis);
01246 void numTermFromBin( EndianIStream& eis);
01247 void pointingDirectionFromBin( EndianIStream& eis);
01248 void targetFromBin( EndianIStream& eis);
01249 void offsetFromBin( EndianIStream& eis);
01250 void pointingModelIdFromBin( EndianIStream& eis);
01251 
01252 void overTheTopFromBin( EndianIStream& eis);
01253 void sourceOffsetFromBin( EndianIStream& eis);
01254 void sourceOffsetReferenceCodeFromBin( EndianIStream& eis);
01255 void sourceOffsetEquinoxFromBin( EndianIStream& eis);
01256 void sampledTimeIntervalFromBin( EndianIStream& eis);
01257 void atmosphericCorrectionFromBin( EndianIStream& eis);
01258 
01259 */
01260         
01262         // text-deserialization material //
01264         std::map<std::string, PointingAttributeFromText> fromTextMethods;
01265         
01266 void antennaIdFromText (const string & s);
01267         
01268         
01269 void timeIntervalFromText (const string & s);
01270         
01271         
01272 void numSampleFromText (const string & s);
01273         
01274         
01275 void encoderFromText (const string & s);
01276         
01277         
01278 void pointingTrackingFromText (const string & s);
01279         
01280         
01281 void usePolynomialsFromText (const string & s);
01282         
01283         
01284 void timeOriginFromText (const string & s);
01285         
01286         
01287 void numTermFromText (const string & s);
01288         
01289         
01290 void pointingDirectionFromText (const string & s);
01291         
01292         
01293 void targetFromText (const string & s);
01294         
01295         
01296 void offsetFromText (const string & s);
01297         
01298         
01299 void pointingModelIdFromText (const string & s);
01300         
01301 
01302         
01303 void overTheTopFromText (const string & s);
01304         
01305         
01306 void sourceOffsetFromText (const string & s);
01307         
01308         
01309 void sourceOffsetReferenceCodeFromText (const string & s);
01310         
01311         
01312 void sourceOffsetEquinoxFromText (const string & s);
01313         
01314         
01315 void sampledTimeIntervalFromText (const string & s);
01316         
01317         
01318 void atmosphericCorrectionFromText (const string & s);
01319         
01320         
01321         
01322         void fromText(const std::string& attributeName, const std::string&  t);
01323         
01328          void toBin(EndianOSStream& eoss);
01329                  
01339 };
01340 
01341 } // End namespace asdm
01342 
01343 #endif /* Pointing_CLASS */