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.64", 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         
00774          void toIDL(asdmIDL::FeedRowIDL& x) const;
00775 #endif
00776         
00777 #ifndef WITHOUT_ACS
00778 
00783         void setFromIDL (asdmIDL::FeedRowIDL x) ;
00784 #endif
00785         
00790         std::string toXML() const;
00791 
00798         void setFromXML (std::string rowDoc) ;
00799 
00802         // binary-deserialization material from an EndianIStream  //
00804 
00805         std::map<std::string, FeedAttributeFromBin> fromBinMethods;
00806 void antennaIdFromBin( EndianIStream& eis);
00807 void spectralWindowIdFromBin( EndianIStream& eis);
00808 void timeIntervalFromBin( EndianIStream& eis);
00809 void feedIdFromBin( EndianIStream& eis);
00810 void numReceptorFromBin( EndianIStream& eis);
00811 void beamOffsetFromBin( EndianIStream& eis);
00812 void focusReferenceFromBin( EndianIStream& eis);
00813 void polarizationTypesFromBin( EndianIStream& eis);
00814 void polResponseFromBin( EndianIStream& eis);
00815 void receptorAngleFromBin( EndianIStream& eis);
00816 void receiverIdFromBin( EndianIStream& eis);
00817 
00818 void feedNumFromBin( EndianIStream& eis);
00819 void illumOffsetFromBin( EndianIStream& eis);
00820 void positionFromBin( EndianIStream& eis);
00821 
00822 
00830          static FeedRow* fromBin(EndianIStream& eis, FeedTable& table, const std::vector<std::string>& attributesSeq);   
00831  
00838          void fromText(const std::string& attributeName, const std::string&  t);
00840 
00841 private:
00845         FeedTable &table;
00849         bool hasBeenAdded;
00850 
00851         // This method is used by the Table class when this row is added to the table.
00852         void isAdded(bool added);
00853 
00854 
00863         FeedRow (FeedTable &table);
00864 
00882          FeedRow (FeedTable &table, FeedRow &row);
00883                 
00885         // Intrinsic Table Attributes //
00887         
00888         
00889         // ===> Attribute feedId
00890         
00891         
00892 
00893         int feedId;
00894 
00895         
00896         
00897         
00907         void setFeedId (int feedId);
00908                 
00909         
00910 
00911         
00912         // ===> Attribute timeInterval
00913         
00914         
00915 
00916         ArrayTimeInterval timeInterval;
00917 
00918         
00919         
00920         
00921 
00922         
00923         // ===> Attribute numReceptor
00924         
00925         
00926 
00927         int numReceptor;
00928 
00929         
00930         
00931         
00932 
00933         
00934         // ===> Attribute beamOffset
00935         
00936         
00937 
00938         vector<vector<double > > beamOffset;
00939 
00940         
00941         
00942         
00943 
00944         
00945         // ===> Attribute focusReference
00946         
00947         
00948 
00949         vector<vector<Length > > focusReference;
00950 
00951         
00952         
00953         
00954 
00955         
00956         // ===> Attribute polarizationTypes
00957         
00958         
00959 
00960         vector<PolarizationTypeMod::PolarizationType > polarizationTypes;
00961 
00962         
00963         
00964         
00965 
00966         
00967         // ===> Attribute polResponse
00968         
00969         
00970 
00971         vector<vector<Complex > > polResponse;
00972 
00973         
00974         
00975         
00976 
00977         
00978         // ===> Attribute receptorAngle
00979         
00980         
00981 
00982         vector<Angle > receptorAngle;
00983 
00984         
00985         
00986         
00987 
00988         
00989         // ===> Attribute feedNum, which is optional
00990         
00991         
00992         bool feedNumExists;
00993         
00994 
00995         int feedNum;
00996 
00997         
00998         
00999         
01000 
01001         
01002         // ===> Attribute illumOffset, which is optional
01003         
01004         
01005         bool illumOffsetExists;
01006         
01007 
01008         vector<Length > illumOffset;
01009 
01010         
01011         
01012         
01013 
01014         
01015         // ===> Attribute position, which is optional
01016         
01017         
01018         bool positionExists;
01019         
01020 
01021         vector<Length > position;
01022 
01023         
01024         
01025         
01026 
01028         // Extrinsic Table Attributes //
01030         
01031         
01032         // ===> Attribute antennaId
01033         
01034         
01035 
01036         Tag antennaId;
01037 
01038         
01039         
01040         
01041 
01042         
01043         // ===> Attribute receiverId
01044         
01045         
01046 
01047         vector<int>  receiverId;
01048 
01049         
01050         
01051         
01052 
01053         
01054         // ===> Attribute spectralWindowId
01055         
01056         
01057 
01058         Tag spectralWindowId;
01059 
01060         
01061         
01062         
01063 
01065         // Links //
01067         
01068         
01069                 
01070 
01071          
01072 
01073         
01074 
01075         
01076                 
01077 
01078          
01079 
01080         
01081 
01082         
01083                 
01084         
01085 
01086         
01087 
01088         
01089 /*
01091         // binary-deserialization material from an EndianIStream  //
01093         std::map<std::string, FeedAttributeFromBin> fromBinMethods;
01094 void antennaIdFromBin( EndianIStream& eis);
01095 void spectralWindowIdFromBin( EndianIStream& eis);
01096 void timeIntervalFromBin( EndianIStream& eis);
01097 void feedIdFromBin( EndianIStream& eis);
01098 void numReceptorFromBin( EndianIStream& eis);
01099 void beamOffsetFromBin( EndianIStream& eis);
01100 void focusReferenceFromBin( EndianIStream& eis);
01101 void polarizationTypesFromBin( EndianIStream& eis);
01102 void polResponseFromBin( EndianIStream& eis);
01103 void receptorAngleFromBin( EndianIStream& eis);
01104 void receiverIdFromBin( EndianIStream& eis);
01105 
01106 void feedNumFromBin( EndianIStream& eis);
01107 void illumOffsetFromBin( EndianIStream& eis);
01108 void positionFromBin( EndianIStream& eis);
01109 
01110 */
01111         
01113         // text-deserialization material //
01115         std::map<std::string, FeedAttributeFromText> fromTextMethods;
01116         
01117 void antennaIdFromText (const string & s);
01118         
01119         
01120 void spectralWindowIdFromText (const string & s);
01121         
01122         
01123 void timeIntervalFromText (const string & s);
01124         
01125         
01126 void feedIdFromText (const string & s);
01127         
01128         
01129 void numReceptorFromText (const string & s);
01130         
01131         
01132 void beamOffsetFromText (const string & s);
01133         
01134         
01135 void focusReferenceFromText (const string & s);
01136         
01137         
01138 void polarizationTypesFromText (const string & s);
01139         
01140         
01141 void polResponseFromText (const string & s);
01142         
01143         
01144 void receptorAngleFromText (const string & s);
01145         
01146         
01147 void receiverIdFromText (const string & s);
01148         
01149 
01150         
01151 void feedNumFromText (const string & s);
01152         
01153         
01154 void illumOffsetFromText (const string & s);
01155         
01156         
01157 void positionFromText (const string & s);
01158         
01159         
01160         
01165          void toBin(EndianOSStream& eoss);
01166                  
01176 };
01177 
01178 } // End namespace asdm
01179 
01180 #endif /* Feed_CLASS */