casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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 
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044 
00045 
00046 
00047 
00048 
00049 
00050          
00051 #include <Angle.h>
00052         
00053 
00054          
00055 #include <Tag.h>
00056         
00057 
00058          
00059 #include <Length.h>
00060         
00061 
00062          
00063 #include <ArrayTimeInterval.h>
00064         
00065 
00066         
00067 #include <ComplexWrapper.h>
00068         
00069 
00070 
00071 
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 #include "CPolarizationType.h"
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 #include <RowTransformer.h>
00104 //#include <TableStreamReader.h>
00105 
00106 /*\file Feed.h
00107     \brief Generated from model's revision "1.61", branch "HEAD"
00108 */
00109 
00110 namespace asdm {
00111 
00112 //class asdm::FeedTable;
00113 
00114 
00115 // class asdm::AntennaRow;
00116 class AntennaRow;
00117 
00118 // class asdm::SpectralWindowRow;
00119 class SpectralWindowRow;
00120 
00121 // class asdm::ReceiverRow;
00122 class ReceiverRow;
00123         
00124 
00125 class FeedRow;
00126 typedef void (FeedRow::*FeedAttributeFromBin) (EndianIStream& eis);
00127 typedef void (FeedRow::*FeedAttributeFromText) (const string& s);
00128 
00135 class FeedRow {
00136 friend class asdm::FeedTable;
00137 friend class asdm::RowTransformer<FeedRow>;
00138 //friend class asdm::TableStreamReader<FeedTable, FeedRow>;
00139 
00140 public:
00141 
00142         virtual ~FeedRow();
00143 
00147         FeedTable &getTable() const;
00148         
00153         bool isAdded() const;
00154                 
00156         // Intrinsic Table Attributes //
00158         
00159         
00160         // ===> Attribute feedId
00161         
00162         
00163         
00164 
00165         
00170         int getFeedId() const;
00171         
00172  
00173         
00174         
00175         
00176         
00177 
00178 
00179         
00180         // ===> Attribute timeInterval
00181         
00182         
00183         
00184 
00185         
00190         ArrayTimeInterval getTimeInterval() const;
00191         
00192  
00193         
00194         
00204         void setTimeInterval (ArrayTimeInterval timeInterval);
00205                 
00206         
00207         
00208         
00209 
00210 
00211         
00212         // ===> Attribute numReceptor
00213         
00214         
00215         
00216 
00217         
00222         int getNumReceptor() const;
00223         
00224  
00225         
00226         
00234         void setNumReceptor (int numReceptor);
00235                 
00236         
00237         
00238         
00239 
00240 
00241         
00242         // ===> Attribute beamOffset
00243         
00244         
00245         
00246 
00247         
00252         vector<vector<double > > getBeamOffset() const;
00253         
00254  
00255         
00256         
00264         void setBeamOffset (vector<vector<double > > beamOffset);
00265                 
00266         
00267         
00268         
00269 
00270 
00271         
00272         // ===> Attribute focusReference
00273         
00274         
00275         
00276 
00277         
00282         vector<vector<Length > > getFocusReference() const;
00283         
00284  
00285         
00286         
00294         void setFocusReference (vector<vector<Length > > focusReference);
00295                 
00296         
00297         
00298         
00299 
00300 
00301         
00302         // ===> Attribute polarizationTypes
00303         
00304         
00305         
00306 
00307         
00312         vector<PolarizationTypeMod::PolarizationType > getPolarizationTypes() const;
00313         
00314  
00315         
00316         
00324         void setPolarizationTypes (vector<PolarizationTypeMod::PolarizationType > polarizationTypes);
00325                 
00326         
00327         
00328         
00329 
00330 
00331         
00332         // ===> Attribute polResponse
00333         
00334         
00335         
00336 
00337         
00342         vector<vector<Complex > > getPolResponse() const;
00343         
00344  
00345         
00346         
00354         void setPolResponse (vector<vector<Complex > > polResponse);
00355                 
00356         
00357         
00358         
00359 
00360 
00361         
00362         // ===> Attribute receptorAngle
00363         
00364         
00365         
00366 
00367         
00372         vector<Angle > getReceptorAngle() const;
00373         
00374  
00375         
00376         
00384         void setReceptorAngle (vector<Angle > receptorAngle);
00385                 
00386         
00387         
00388         
00389 
00390 
00391         
00392         // ===> Attribute feedNum, which is optional
00393         
00394         
00395         
00400         bool isFeedNumExists() const;
00401         
00402 
00403         
00409         int getFeedNum() const;
00410         
00411  
00412         
00413         
00420         void setFeedNum (int feedNum);
00421                 
00422         
00423         
00424         
00428         void clearFeedNum ();
00429         
00430 
00431 
00432         
00433         // ===> Attribute illumOffset, which is optional
00434         
00435         
00436         
00441         bool isIllumOffsetExists() const;
00442         
00443 
00444         
00450         vector<Length > getIllumOffset() const;
00451         
00452  
00453         
00454         
00461         void setIllumOffset (vector<Length > illumOffset);
00462                 
00463         
00464         
00465         
00469         void clearIllumOffset ();
00470         
00471 
00472 
00473         
00474         // ===> Attribute position, which is optional
00475         
00476         
00477         
00482         bool isPositionExists() const;
00483         
00484 
00485         
00491         vector<Length > getPosition() const;
00492         
00493  
00494         
00495         
00502         void setPosition (vector<Length > position);
00503                 
00504         
00505         
00506         
00510         void clearPosition ();
00511         
00512 
00513 
00515         // Extrinsic Table Attributes //
00517         
00518         
00519         // ===> Attribute antennaId
00520         
00521         
00522         
00523 
00524         
00529         Tag getAntennaId() const;
00530         
00531  
00532         
00533         
00543         void setAntennaId (Tag antennaId);
00544                 
00545         
00546         
00547         
00548 
00549 
00550         
00551         // ===> Attribute receiverId
00552         
00553         
00554         
00555 
00556         
00561         vector<int>  getReceiverId() const;
00562         
00563  
00564         
00565         
00573         void setReceiverId (vector<int>  receiverId);
00574                 
00575         
00576         
00577         
00578 
00579 
00580         
00581         // ===> Attribute spectralWindowId
00582         
00583         
00584         
00585 
00586         
00591         Tag getSpectralWindowId() const;
00592         
00593  
00594         
00595         
00605         void setSpectralWindowId (Tag spectralWindowId);
00606                 
00607         
00608         
00609         
00610 
00611 
00613         // Links //
00615         
00616         
00617 
00618         
00619                 
00626          AntennaRow* getAntennaUsingAntennaId();
00627          
00628 
00629         
00630 
00631         
00632 
00633         
00634                 
00641          SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00642          
00643 
00644         
00645 
00646         
00647                 
00655         void setReceiverId (int i, int receiverId); 
00656                         
00657         
00658 
00659         
00660                 
00661 
00662         // ===> Slices link from a row of Feed table to a collection of row of Receiver table.  
00663 
00668         void addReceiverId(int id); 
00669         
00674         void addReceiverId(vector<int> id); 
00675 
00676 
00681         const vector <ReceiverRow *> getReceivers(int i);
00682 
00683 
00689         const vector <ReceiverRow *> getReceivers();
00690         
00691 
00692 
00693         
00694 
00695         
00696         
00697         
00723         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);
00724         
00725         
00726 
00727         
00747         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); 
00748                  
00749         
00758         bool equalByRequiredValue(FeedRow* x) ;
00759         
00760 #ifndef WITHOUT_ACS
00761 
00765         asdmIDL::FeedRowIDL *toIDL() const;
00766 #endif
00767         
00768 #ifndef WITHOUT_ACS
00769 
00774         void setFromIDL (asdmIDL::FeedRowIDL x) ;
00775 #endif
00776         
00781         std::string toXML() const;
00782 
00789         void setFromXML (std::string rowDoc) ;
00790 
00793         // binary-deserialization material from an EndianIStream  //
00795 
00796         std::map<std::string, FeedAttributeFromBin> fromBinMethods;
00797 void antennaIdFromBin( EndianIStream& eis);
00798 void spectralWindowIdFromBin( EndianIStream& eis);
00799 void timeIntervalFromBin( EndianIStream& eis);
00800 void feedIdFromBin( EndianIStream& eis);
00801 void numReceptorFromBin( EndianIStream& eis);
00802 void beamOffsetFromBin( EndianIStream& eis);
00803 void focusReferenceFromBin( EndianIStream& eis);
00804 void polarizationTypesFromBin( EndianIStream& eis);
00805 void polResponseFromBin( EndianIStream& eis);
00806 void receptorAngleFromBin( EndianIStream& eis);
00807 void receiverIdFromBin( EndianIStream& eis);
00808 
00809 void feedNumFromBin( EndianIStream& eis);
00810 void illumOffsetFromBin( EndianIStream& eis);
00811 void positionFromBin( EndianIStream& eis);
00812 
00813 
00821          static FeedRow* fromBin(EndianIStream& eis, FeedTable& table, const std::vector<std::string>& attributesSeq);   
00823 
00824 private:
00828         FeedTable &table;
00832         bool hasBeenAdded;
00833 
00834         // This method is used by the Table class when this row is added to the table.
00835         void isAdded(bool added);
00836 
00837 
00846         FeedRow (FeedTable &table);
00847 
00865          FeedRow (FeedTable &table, FeedRow &row);
00866                 
00868         // Intrinsic Table Attributes //
00870         
00871         
00872         // ===> Attribute feedId
00873         
00874         
00875 
00876         int feedId;
00877 
00878         
00879         
00880         
00890         void setFeedId (int feedId);
00891                 
00892         
00893 
00894         
00895         // ===> Attribute timeInterval
00896         
00897         
00898 
00899         ArrayTimeInterval timeInterval;
00900 
00901         
00902         
00903         
00904 
00905         
00906         // ===> Attribute numReceptor
00907         
00908         
00909 
00910         int numReceptor;
00911 
00912         
00913         
00914         
00915 
00916         
00917         // ===> Attribute beamOffset
00918         
00919         
00920 
00921         vector<vector<double > > beamOffset;
00922 
00923         
00924         
00925         
00926 
00927         
00928         // ===> Attribute focusReference
00929         
00930         
00931 
00932         vector<vector<Length > > focusReference;
00933 
00934         
00935         
00936         
00937 
00938         
00939         // ===> Attribute polarizationTypes
00940         
00941         
00942 
00943         vector<PolarizationTypeMod::PolarizationType > polarizationTypes;
00944 
00945         
00946         
00947         
00948 
00949         
00950         // ===> Attribute polResponse
00951         
00952         
00953 
00954         vector<vector<Complex > > polResponse;
00955 
00956         
00957         
00958         
00959 
00960         
00961         // ===> Attribute receptorAngle
00962         
00963         
00964 
00965         vector<Angle > receptorAngle;
00966 
00967         
00968         
00969         
00970 
00971         
00972         // ===> Attribute feedNum, which is optional
00973         
00974         
00975         bool feedNumExists;
00976         
00977 
00978         int feedNum;
00979 
00980         
00981         
00982         
00983 
00984         
00985         // ===> Attribute illumOffset, which is optional
00986         
00987         
00988         bool illumOffsetExists;
00989         
00990 
00991         vector<Length > illumOffset;
00992 
00993         
00994         
00995         
00996 
00997         
00998         // ===> Attribute position, which is optional
00999         
01000         
01001         bool positionExists;
01002         
01003 
01004         vector<Length > position;
01005 
01006         
01007         
01008         
01009 
01011         // Extrinsic Table Attributes //
01013         
01014         
01015         // ===> Attribute antennaId
01016         
01017         
01018 
01019         Tag antennaId;
01020 
01021         
01022         
01023         
01024 
01025         
01026         // ===> Attribute receiverId
01027         
01028         
01029 
01030         vector<int>  receiverId;
01031 
01032         
01033         
01034         
01035 
01036         
01037         // ===> Attribute spectralWindowId
01038         
01039         
01040 
01041         Tag spectralWindowId;
01042 
01043         
01044         
01045         
01046 
01048         // Links //
01050         
01051         
01052                 
01053 
01054          
01055 
01056         
01057 
01058         
01059                 
01060 
01061          
01062 
01063         
01064 
01065         
01066                 
01067         
01068 
01069         
01070 
01071         
01072 /*
01074         // binary-deserialization material from an EndianIStream  //
01076         std::map<std::string, FeedAttributeFromBin> fromBinMethods;
01077 void antennaIdFromBin( EndianIStream& eis);
01078 void spectralWindowIdFromBin( EndianIStream& eis);
01079 void timeIntervalFromBin( EndianIStream& eis);
01080 void feedIdFromBin( EndianIStream& eis);
01081 void numReceptorFromBin( EndianIStream& eis);
01082 void beamOffsetFromBin( EndianIStream& eis);
01083 void focusReferenceFromBin( EndianIStream& eis);
01084 void polarizationTypesFromBin( EndianIStream& eis);
01085 void polResponseFromBin( EndianIStream& eis);
01086 void receptorAngleFromBin( EndianIStream& eis);
01087 void receiverIdFromBin( EndianIStream& eis);
01088 
01089 void feedNumFromBin( EndianIStream& eis);
01090 void illumOffsetFromBin( EndianIStream& eis);
01091 void positionFromBin( EndianIStream& eis);
01092 
01093 */
01094         
01096         // text-deserialization material //
01098         std::map<std::string, FeedAttributeFromText> fromTextMethods;
01099         
01100 void antennaIdFromText (const string & s);
01101         
01102         
01103 void spectralWindowIdFromText (const string & s);
01104         
01105         
01106 void timeIntervalFromText (const string & s);
01107         
01108         
01109 void feedIdFromText (const string & s);
01110         
01111         
01112 void numReceptorFromText (const string & s);
01113         
01114         
01115 void beamOffsetFromText (const string & s);
01116         
01117         
01118 void focusReferenceFromText (const string & s);
01119         
01120         
01121 void polarizationTypesFromText (const string & s);
01122         
01123         
01124 void polResponseFromText (const string & s);
01125         
01126         
01127 void receptorAngleFromText (const string & s);
01128         
01129         
01130 void receiverIdFromText (const string & s);
01131         
01132 
01133         
01134 void feedNumFromText (const string & s);
01135         
01136         
01137 void illumOffsetFromText (const string & s);
01138         
01139         
01140 void positionFromText (const string & s);
01141         
01142         
01143         
01144         void fromText(const std::string& attributeName, const std::string&  t);
01145         
01150          void toBin(EndianOSStream& eoss);
01151                  
01161 };
01162 
01163 } // End namespace asdm
01164 
01165 #endif /* Feed_CLASS */