FeedRow.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 FeedRow.h
00032  */
00033  
00034 #ifndef FeedRow_CLASS
00035 #define FeedRow_CLASS
00036 
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 using std::vector;
00041 using std::string;
00042 using std::set;
00043 
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::FeedRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <Angle.h>
00055 using  asdm::Angle;
00056 
00057 #include <Tag.h>
00058 using  asdm::Tag;
00059 
00060 #include <Length.h>
00061 using  asdm::Length;
00062 
00063 #include <ArrayTimeInterval.h>
00064 using  asdm::ArrayTimeInterval;
00065 
00066 #include <Complex.h>
00067 using  asdm::Complex;
00068 
00069 
00070 
00071 
00072         
00073 
00074         
00075 
00076         
00077 
00078         
00079 
00080         
00081 
00082         
00083 #include "CPolarizationType.h"
00084 using namespace PolarizationTypeMod;
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097 
00098 
00099 #include <ConversionException.h>
00100 #include <NoSuchRow.h>
00101 #include <IllegalAccessException.h>
00102 
00103 
00104 /*\file Feed.h
00105     \brief Generated from model's revision "1.55", branch "HEAD"
00106 */
00107 
00108 namespace asdm {
00109 
00110 //class asdm::FeedTable;
00111 
00112 
00113 // class asdm::AntennaRow;
00114 class AntennaRow;
00115 
00116 // class asdm::SpectralWindowRow;
00117 class SpectralWindowRow;
00118 
00119 // class asdm::ReceiverRow;
00120 class ReceiverRow;
00121 
00122 // class asdm::BeamRow;
00123 class BeamRow;
00124         
00125 
00126 class FeedRow;
00127 typedef void (FeedRow::*FeedAttributeFromBin) (EndianISStream& eiss);
00128 
00135 class FeedRow {
00136 friend class asdm::FeedTable;
00137 
00138 public:
00139 
00140         virtual ~FeedRow();
00141 
00145         FeedTable &getTable() const;
00146         
00151         bool isAdded() const;
00152                 
00154         // Intrinsic Table Attributes //
00156         
00157         
00158         // ===> Attribute feedId
00159         
00160         
00161         
00162 
00163         
00168         int getFeedId() const;
00169         
00170  
00171         
00172         
00173         
00174         
00175 
00176 
00177         
00178         // ===> Attribute timeInterval
00179         
00180         
00181         
00182 
00183         
00188         ArrayTimeInterval getTimeInterval() const;
00189         
00190  
00191         
00192         
00202         void setTimeInterval (ArrayTimeInterval timeInterval);
00203                 
00204         
00205         
00206         
00207 
00208 
00209         
00210         // ===> Attribute numReceptor
00211         
00212         
00213         
00214 
00215         
00220         int getNumReceptor() const;
00221         
00222  
00223         
00224         
00232         void setNumReceptor (int numReceptor);
00233                 
00234         
00235         
00236         
00237 
00238 
00239         
00240         // ===> Attribute beamOffset
00241         
00242         
00243         
00244 
00245         
00250         vector<vector<double > > getBeamOffset() const;
00251         
00252  
00253         
00254         
00262         void setBeamOffset (vector<vector<double > > beamOffset);
00263                 
00264         
00265         
00266         
00267 
00268 
00269         
00270         // ===> Attribute focusReference
00271         
00272         
00273         
00274 
00275         
00280         vector<vector<Length > > getFocusReference() const;
00281         
00282  
00283         
00284         
00292         void setFocusReference (vector<vector<Length > > focusReference);
00293                 
00294         
00295         
00296         
00297 
00298 
00299         
00300         // ===> Attribute polarizationTypes
00301         
00302         
00303         
00304 
00305         
00310         vector<PolarizationTypeMod::PolarizationType > getPolarizationTypes() const;
00311         
00312  
00313         
00314         
00322         void setPolarizationTypes (vector<PolarizationTypeMod::PolarizationType > polarizationTypes);
00323                 
00324         
00325         
00326         
00327 
00328 
00329         
00330         // ===> Attribute polResponse
00331         
00332         
00333         
00334 
00335         
00340         vector<vector<Complex > > getPolResponse() const;
00341         
00342  
00343         
00344         
00352         void setPolResponse (vector<vector<Complex > > polResponse);
00353                 
00354         
00355         
00356         
00357 
00358 
00359         
00360         // ===> Attribute receptorAngle
00361         
00362         
00363         
00364 
00365         
00370         vector<Angle > getReceptorAngle() const;
00371         
00372  
00373         
00374         
00382         void setReceptorAngle (vector<Angle > receptorAngle);
00383                 
00384         
00385         
00386         
00387 
00388 
00389         
00390         // ===> Attribute feedNum, which is optional
00391         
00392         
00393         
00398         bool isFeedNumExists() const;
00399         
00400 
00401         
00407         int getFeedNum() const;
00408         
00409  
00410         
00411         
00418         void setFeedNum (int feedNum);
00419                 
00420         
00421         
00422         
00426         void clearFeedNum ();
00427         
00428 
00429 
00430         
00431         // ===> Attribute illumOffset, which is optional
00432         
00433         
00434         
00439         bool isIllumOffsetExists() const;
00440         
00441 
00442         
00448         vector<Length > getIllumOffset() const;
00449         
00450  
00451         
00452         
00459         void setIllumOffset (vector<Length > illumOffset);
00460                 
00461         
00462         
00463         
00467         void clearIllumOffset ();
00468         
00469 
00470 
00471         
00472         // ===> Attribute position, which is optional
00473         
00474         
00475         
00480         bool isPositionExists() const;
00481         
00482 
00483         
00489         vector<Length > getPosition() const;
00490         
00491  
00492         
00493         
00500         void setPosition (vector<Length > position);
00501                 
00502         
00503         
00504         
00508         void clearPosition ();
00509         
00510 
00511 
00513         // Extrinsic Table Attributes //
00515         
00516         
00517         // ===> Attribute antennaId
00518         
00519         
00520         
00521 
00522         
00527         Tag getAntennaId() const;
00528         
00529  
00530         
00531         
00541         void setAntennaId (Tag antennaId);
00542                 
00543         
00544         
00545         
00546 
00547 
00548         
00549         // ===> Attribute beamId, which is optional
00550         
00551         
00552         
00557         bool isBeamIdExists() const;
00558         
00559 
00560         
00566         vector<Tag>  getBeamId() const;
00567         
00568  
00569         
00570         
00577         void setBeamId (vector<Tag>  beamId);
00578                 
00579         
00580         
00581         
00585         void clearBeamId ();
00586         
00587 
00588 
00589         
00590         // ===> Attribute receiverId
00591         
00592         
00593         
00594 
00595         
00600         vector<int>  getReceiverId() const;
00601         
00602  
00603         
00604         
00612         void setReceiverId (vector<int>  receiverId);
00613                 
00614         
00615         
00616         
00617 
00618 
00619         
00620         // ===> Attribute spectralWindowId
00621         
00622         
00623         
00624 
00625         
00630         Tag getSpectralWindowId() const;
00631         
00632  
00633         
00634         
00644         void setSpectralWindowId (Tag spectralWindowId);
00645                 
00646         
00647         
00648         
00649 
00650 
00652         // Links //
00654         
00655         
00656 
00657         
00658                 
00665          AntennaRow* getAntennaUsingAntennaId();
00666          
00667 
00668         
00669 
00670         
00671 
00672         
00673                 
00680          SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00681          
00682 
00683         
00684 
00685         
00686                 
00694         void setReceiverId (int i, int receiverId); 
00695                         
00696         
00697 
00698         
00699                 
00700 
00701         // ===> Slices link from a row of Feed table to a collection of row of Receiver table.  
00702 
00707         void addReceiverId(int id); 
00708         
00713         void addReceiverId(vector<int> id); 
00714 
00715 
00720         const vector <ReceiverRow *> getReceivers(int i);
00721 
00722 
00728         const vector <ReceiverRow *> getReceivers();
00729         
00730 
00731 
00732         
00733 
00734         
00735                 
00742         void setBeamId (int i, Tag beamId)  ;
00743                         
00744         
00745 
00746         
00747                  
00752  void addBeamId(Tag id); 
00753 
00758  void addBeamId(const vector<Tag> & id); 
00759  
00760 
00766  const Tag getBeamId(int i);
00767  
00775  BeamRow* getBeamUsingBeamId(int i); 
00776  
00781  vector<BeamRow *> getBeamsUsingBeamId(); 
00782   
00783 
00784         
00785 
00786         
00787         
00788         
00814         bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle, vector<int>  receiverId);
00815         
00816         
00817 
00818         
00838         bool compareRequiredValue(int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle, vector<int>  receiverId); 
00839                  
00840         
00849         bool equalByRequiredValue(FeedRow* x) ;
00850         
00851 #ifndef WITHOUT_ACS
00852 
00856         FeedRowIDL *toIDL() const;
00857 #endif
00858         
00859 #ifndef WITHOUT_ACS
00860 
00865         void setFromIDL (FeedRowIDL x) ;
00866 #endif
00867         
00872         string toXML() const;
00873 
00880         void setFromXML (string rowDoc) ;       
00881 
00882 private:
00886         FeedTable &table;
00890         bool hasBeenAdded;
00891 
00892         // This method is used by the Table class when this row is added to the table.
00893         void isAdded(bool added);
00894 
00895 
00904         FeedRow (FeedTable &table);
00905 
00923          FeedRow (FeedTable &table, FeedRow &row);
00924                 
00926         // Intrinsic Table Attributes //
00928         
00929         
00930         // ===> Attribute feedId
00931         
00932         
00933 
00934         int feedId;
00935 
00936         
00937         
00938         
00948         void setFeedId (int feedId);
00949                 
00950         
00951 
00952         
00953         // ===> Attribute timeInterval
00954         
00955         
00956 
00957         ArrayTimeInterval timeInterval;
00958 
00959         
00960         
00961         
00962 
00963         
00964         // ===> Attribute numReceptor
00965         
00966         
00967 
00968         int numReceptor;
00969 
00970         
00971         
00972         
00973 
00974         
00975         // ===> Attribute beamOffset
00976         
00977         
00978 
00979         vector<vector<double > > beamOffset;
00980 
00981         
00982         
00983         
00984 
00985         
00986         // ===> Attribute focusReference
00987         
00988         
00989 
00990         vector<vector<Length > > focusReference;
00991 
00992         
00993         
00994         
00995 
00996         
00997         // ===> Attribute polarizationTypes
00998         
00999         
01000 
01001         vector<PolarizationTypeMod::PolarizationType > polarizationTypes;
01002 
01003         
01004         
01005         
01006 
01007         
01008         // ===> Attribute polResponse
01009         
01010         
01011 
01012         vector<vector<Complex > > polResponse;
01013 
01014         
01015         
01016         
01017 
01018         
01019         // ===> Attribute receptorAngle
01020         
01021         
01022 
01023         vector<Angle > receptorAngle;
01024 
01025         
01026         
01027         
01028 
01029         
01030         // ===> Attribute feedNum, which is optional
01031         
01032         
01033         bool feedNumExists;
01034         
01035 
01036         int feedNum;
01037 
01038         
01039         
01040         
01041 
01042         
01043         // ===> Attribute illumOffset, which is optional
01044         
01045         
01046         bool illumOffsetExists;
01047         
01048 
01049         vector<Length > illumOffset;
01050 
01051         
01052         
01053         
01054 
01055         
01056         // ===> Attribute position, which is optional
01057         
01058         
01059         bool positionExists;
01060         
01061 
01062         vector<Length > position;
01063 
01064         
01065         
01066         
01067 
01069         // Extrinsic Table Attributes //
01071         
01072         
01073         // ===> Attribute antennaId
01074         
01075         
01076 
01077         Tag antennaId;
01078 
01079         
01080         
01081         
01082 
01083         
01084         // ===> Attribute beamId, which is optional
01085         
01086         
01087         bool beamIdExists;
01088         
01089 
01090         vector<Tag>  beamId;
01091 
01092         
01093         
01094         
01095 
01096         
01097         // ===> Attribute receiverId
01098         
01099         
01100 
01101         vector<int>  receiverId;
01102 
01103         
01104         
01105         
01106 
01107         
01108         // ===> Attribute spectralWindowId
01109         
01110         
01111 
01112         Tag spectralWindowId;
01113 
01114         
01115         
01116         
01117 
01119         // Links //
01121         
01122         
01123                 
01124 
01125          
01126 
01127         
01128 
01129         
01130                 
01131 
01132          
01133 
01134         
01135 
01136         
01137                 
01138         
01139 
01140         
01141 
01142         
01143                 
01144 
01145 
01146         
01147 
01148         
01150         // binary-deserialization material//
01152         map<string, FeedAttributeFromBin> fromBinMethods;
01153 void antennaIdFromBin( EndianISStream& eiss);
01154 void spectralWindowIdFromBin( EndianISStream& eiss);
01155 void timeIntervalFromBin( EndianISStream& eiss);
01156 void feedIdFromBin( EndianISStream& eiss);
01157 void numReceptorFromBin( EndianISStream& eiss);
01158 void beamOffsetFromBin( EndianISStream& eiss);
01159 void focusReferenceFromBin( EndianISStream& eiss);
01160 void polarizationTypesFromBin( EndianISStream& eiss);
01161 void polResponseFromBin( EndianISStream& eiss);
01162 void receptorAngleFromBin( EndianISStream& eiss);
01163 void receiverIdFromBin( EndianISStream& eiss);
01164 
01165 void feedNumFromBin( EndianISStream& eiss);
01166 void illumOffsetFromBin( EndianISStream& eiss);
01167 void positionFromBin( EndianISStream& eiss);
01168 void beamIdFromBin( EndianISStream& eiss);
01169         
01170         
01175          void toBin(EndianOSStream& eoss);
01176                  
01184          static FeedRow* fromBin(EndianISStream& eiss, FeedTable& table, const vector<string>& attributesSeq);   
01185 
01186 };
01187 
01188 } // End namespace asdm
01189 
01190 #endif /* Feed_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines