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.64", 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         
00901          void toIDL(asdmIDL::PointingRowIDL& x) const;
00902 #endif
00903         
00904 #ifndef WITHOUT_ACS
00905 
00910         void setFromIDL (asdmIDL::PointingRowIDL x) ;
00911 #endif
00912         
00917         std::string toXML() const;
00918 
00925         void setFromXML (std::string rowDoc) ;
00926 
00929         // binary-deserialization material from an EndianIStream  //
00931 
00932         std::map<std::string, PointingAttributeFromBin> fromBinMethods;
00933 void antennaIdFromBin( EndianIStream& eis);
00934 void timeIntervalFromBin( EndianIStream& eis);
00935 void numSampleFromBin( EndianIStream& eis);
00936 void encoderFromBin( EndianIStream& eis);
00937 void pointingTrackingFromBin( EndianIStream& eis);
00938 void usePolynomialsFromBin( EndianIStream& eis);
00939 void timeOriginFromBin( EndianIStream& eis);
00940 void numTermFromBin( EndianIStream& eis);
00941 void pointingDirectionFromBin( EndianIStream& eis);
00942 void targetFromBin( EndianIStream& eis);
00943 void offsetFromBin( EndianIStream& eis);
00944 void pointingModelIdFromBin( EndianIStream& eis);
00945 
00946 void overTheTopFromBin( EndianIStream& eis);
00947 void sourceOffsetFromBin( EndianIStream& eis);
00948 void sourceOffsetReferenceCodeFromBin( EndianIStream& eis);
00949 void sourceOffsetEquinoxFromBin( EndianIStream& eis);
00950 void sampledTimeIntervalFromBin( EndianIStream& eis);
00951 void atmosphericCorrectionFromBin( EndianIStream& eis);
00952 
00953 
00961          static PointingRow* fromBin(EndianIStream& eis, PointingTable& table, const std::vector<std::string>& attributesSeq);   
00962  
00969          void fromText(const std::string& attributeName, const std::string&  t);
00971 
00972 private:
00976         PointingTable &table;
00980         bool hasBeenAdded;
00981 
00982         // This method is used by the Table class when this row is added to the table.
00983         void isAdded(bool added);
00984 
00985 
00994         PointingRow (PointingTable &table);
00995 
01013          PointingRow (PointingTable &table, PointingRow &row);
01014                 
01016         // Intrinsic Table Attributes //
01018         
01019         
01020         // ===> Attribute timeInterval
01021         
01022         
01023 
01024         ArrayTimeInterval timeInterval;
01025 
01026         
01027         
01028         
01029 
01030         
01031         // ===> Attribute numSample
01032         
01033         
01034 
01035         int numSample;
01036 
01037         
01038         
01039         
01040 
01041         
01042         // ===> Attribute encoder
01043         
01044         
01045 
01046         vector<vector<Angle > > encoder;
01047 
01048         
01049         
01050         
01051 
01052         
01053         // ===> Attribute pointingTracking
01054         
01055         
01056 
01057         bool pointingTracking;
01058 
01059         
01060         
01061         
01062 
01063         
01064         // ===> Attribute usePolynomials
01065         
01066         
01067 
01068         bool usePolynomials;
01069 
01070         
01071         
01072         
01073 
01074         
01075         // ===> Attribute timeOrigin
01076         
01077         
01078 
01079         ArrayTime timeOrigin;
01080 
01081         
01082         
01083         
01084 
01085         
01086         // ===> Attribute numTerm
01087         
01088         
01089 
01090         int numTerm;
01091 
01092         
01093         
01094         
01095 
01096         
01097         // ===> Attribute pointingDirection
01098         
01099         
01100 
01101         vector<vector<Angle > > pointingDirection;
01102 
01103         
01104         
01105         
01106 
01107         
01108         // ===> Attribute target
01109         
01110         
01111 
01112         vector<vector<Angle > > target;
01113 
01114         
01115         
01116         
01117 
01118         
01119         // ===> Attribute offset
01120         
01121         
01122 
01123         vector<vector<Angle > > offset;
01124 
01125         
01126         
01127         
01128 
01129         
01130         // ===> Attribute overTheTop, which is optional
01131         
01132         
01133         bool overTheTopExists;
01134         
01135 
01136         bool overTheTop;
01137 
01138         
01139         
01140         
01141 
01142         
01143         // ===> Attribute sourceOffset, which is optional
01144         
01145         
01146         bool sourceOffsetExists;
01147         
01148 
01149         vector<vector<Angle > > sourceOffset;
01150 
01151         
01152         
01153         
01154 
01155         
01156         // ===> Attribute sourceOffsetReferenceCode, which is optional
01157         
01158         
01159         bool sourceOffsetReferenceCodeExists;
01160         
01161 
01162         DirectionReferenceCodeMod::DirectionReferenceCode sourceOffsetReferenceCode;
01163 
01164         
01165         
01166         
01167 
01168         
01169         // ===> Attribute sourceOffsetEquinox, which is optional
01170         
01171         
01172         bool sourceOffsetEquinoxExists;
01173         
01174 
01175         ArrayTime sourceOffsetEquinox;
01176 
01177         
01178         
01179         
01180 
01181         
01182         // ===> Attribute sampledTimeInterval, which is optional
01183         
01184         
01185         bool sampledTimeIntervalExists;
01186         
01187 
01188         vector<ArrayTimeInterval > sampledTimeInterval;
01189 
01190         
01191         
01192         
01193 
01194         
01195         // ===> Attribute atmosphericCorrection, which is optional
01196         
01197         
01198         bool atmosphericCorrectionExists;
01199         
01200 
01201         vector<vector<Angle > > atmosphericCorrection;
01202 
01203         
01204         
01205         
01206 
01208         // Extrinsic Table Attributes //
01210         
01211         
01212         // ===> Attribute antennaId
01213         
01214         
01215 
01216         Tag antennaId;
01217 
01218         
01219         
01220         
01221 
01222         
01223         // ===> Attribute pointingModelId
01224         
01225         
01226 
01227         int pointingModelId;
01228 
01229         
01230         
01231         
01232 
01234         // Links //
01236         
01237         
01238                 
01239 
01240 
01241         
01242 
01243         
01244                 
01245 
01246          
01247 
01248         
01249 
01250         
01251 /*
01253         // binary-deserialization material from an EndianIStream  //
01255         std::map<std::string, PointingAttributeFromBin> fromBinMethods;
01256 void antennaIdFromBin( EndianIStream& eis);
01257 void timeIntervalFromBin( EndianIStream& eis);
01258 void numSampleFromBin( EndianIStream& eis);
01259 void encoderFromBin( EndianIStream& eis);
01260 void pointingTrackingFromBin( EndianIStream& eis);
01261 void usePolynomialsFromBin( EndianIStream& eis);
01262 void timeOriginFromBin( EndianIStream& eis);
01263 void numTermFromBin( EndianIStream& eis);
01264 void pointingDirectionFromBin( EndianIStream& eis);
01265 void targetFromBin( EndianIStream& eis);
01266 void offsetFromBin( EndianIStream& eis);
01267 void pointingModelIdFromBin( EndianIStream& eis);
01268 
01269 void overTheTopFromBin( EndianIStream& eis);
01270 void sourceOffsetFromBin( EndianIStream& eis);
01271 void sourceOffsetReferenceCodeFromBin( EndianIStream& eis);
01272 void sourceOffsetEquinoxFromBin( EndianIStream& eis);
01273 void sampledTimeIntervalFromBin( EndianIStream& eis);
01274 void atmosphericCorrectionFromBin( EndianIStream& eis);
01275 
01276 */
01277         
01279         // text-deserialization material //
01281         std::map<std::string, PointingAttributeFromText> fromTextMethods;
01282         
01283 void antennaIdFromText (const string & s);
01284         
01285         
01286 void timeIntervalFromText (const string & s);
01287         
01288         
01289 void numSampleFromText (const string & s);
01290         
01291         
01292 void encoderFromText (const string & s);
01293         
01294         
01295 void pointingTrackingFromText (const string & s);
01296         
01297         
01298 void usePolynomialsFromText (const string & s);
01299         
01300         
01301 void timeOriginFromText (const string & s);
01302         
01303         
01304 void numTermFromText (const string & s);
01305         
01306         
01307 void pointingDirectionFromText (const string & s);
01308         
01309         
01310 void targetFromText (const string & s);
01311         
01312         
01313 void offsetFromText (const string & s);
01314         
01315         
01316 void pointingModelIdFromText (const string & s);
01317         
01318 
01319         
01320 void overTheTopFromText (const string & s);
01321         
01322         
01323 void sourceOffsetFromText (const string & s);
01324         
01325         
01326 void sourceOffsetReferenceCodeFromText (const string & s);
01327         
01328         
01329 void sourceOffsetEquinoxFromText (const string & s);
01330         
01331         
01332 void sampledTimeIntervalFromText (const string & s);
01333         
01334         
01335 void atmosphericCorrectionFromText (const string & s);
01336         
01337         
01338         
01343          void toBin(EndianOSStream& eoss);
01344                  
01354 };
01355 
01356 } // End namespace asdm
01357 
01358 #endif /* Pointing_CLASS */