casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
GainTrackingRow.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 GainTrackingRow.h
00032  */
00033  
00034 #ifndef GainTrackingRow_CLASS
00035 #define GainTrackingRow_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 <Tag.h>
00052         
00053 
00054          
00055 #include <ArrayTimeInterval.h>
00056         
00057 
00058         
00059 #include <ComplexWrapper.h>
00060         
00061 
00062 
00063 
00064 
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 #include "CPolarizationType.h"
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083 
00084 
00085 #include <ConversionException.h>
00086 #include <NoSuchRow.h>
00087 #include <IllegalAccessException.h>
00088 
00089 #include <RowTransformer.h>
00090 //#include <TableStreamReader.h>
00091 
00092 /*\file GainTracking.h
00093     \brief Generated from model's revision "1.64", branch "HEAD"
00094 */
00095 
00096 namespace asdm {
00097 
00098 //class asdm::GainTrackingTable;
00099 
00100 
00101 // class asdm::AntennaRow;
00102 class AntennaRow;
00103 
00104 // class asdm::SpectralWindowRow;
00105 class SpectralWindowRow;
00106 
00107 // class asdm::FeedRow;
00108 class FeedRow;
00109         
00110 
00111 class GainTrackingRow;
00112 typedef void (GainTrackingRow::*GainTrackingAttributeFromBin) (EndianIStream& eis);
00113 typedef void (GainTrackingRow::*GainTrackingAttributeFromText) (const string& s);
00114 
00121 class GainTrackingRow {
00122 friend class asdm::GainTrackingTable;
00123 friend class asdm::RowTransformer<GainTrackingRow>;
00124 //friend class asdm::TableStreamReader<GainTrackingTable, GainTrackingRow>;
00125 
00126 public:
00127 
00128         virtual ~GainTrackingRow();
00129 
00133         GainTrackingTable &getTable() const;
00134         
00139         bool isAdded() const;
00140                 
00142         // Intrinsic Table Attributes //
00144         
00145         
00146         // ===> Attribute timeInterval
00147         
00148         
00149         
00150 
00151         
00156         ArrayTimeInterval getTimeInterval() const;
00157         
00158  
00159         
00160         
00170         void setTimeInterval (ArrayTimeInterval timeInterval);
00171                 
00172         
00173         
00174         
00175 
00176 
00177         
00178         // ===> Attribute numReceptor
00179         
00180         
00181         
00182 
00183         
00188         int getNumReceptor() const;
00189         
00190  
00191         
00192         
00200         void setNumReceptor (int numReceptor);
00201                 
00202         
00203         
00204         
00205 
00206 
00207         
00208         // ===> Attribute attenuator
00209         
00210         
00211         
00212 
00213         
00218         vector<float > getAttenuator() const;
00219         
00220  
00221         
00222         
00230         void setAttenuator (vector<float > attenuator);
00231                 
00232         
00233         
00234         
00235 
00236 
00237         
00238         // ===> Attribute polarizationType
00239         
00240         
00241         
00242 
00243         
00248         vector<PolarizationTypeMod::PolarizationType > getPolarizationType() const;
00249         
00250  
00251         
00252         
00260         void setPolarizationType (vector<PolarizationTypeMod::PolarizationType > polarizationType);
00261                 
00262         
00263         
00264         
00265 
00266 
00267         
00268         // ===> Attribute samplingLevel, which is optional
00269         
00270         
00271         
00276         bool isSamplingLevelExists() const;
00277         
00278 
00279         
00285         float getSamplingLevel() const;
00286         
00287  
00288         
00289         
00296         void setSamplingLevel (float samplingLevel);
00297                 
00298         
00299         
00300         
00304         void clearSamplingLevel ();
00305         
00306 
00307 
00308         
00309         // ===> Attribute numAttFreq, which is optional
00310         
00311         
00312         
00317         bool isNumAttFreqExists() const;
00318         
00319 
00320         
00326         int getNumAttFreq() const;
00327         
00328  
00329         
00330         
00337         void setNumAttFreq (int numAttFreq);
00338                 
00339         
00340         
00341         
00345         void clearNumAttFreq ();
00346         
00347 
00348 
00349         
00350         // ===> Attribute attFreq, which is optional
00351         
00352         
00353         
00358         bool isAttFreqExists() const;
00359         
00360 
00361         
00367         vector<double > getAttFreq() const;
00368         
00369  
00370         
00371         
00378         void setAttFreq (vector<double > attFreq);
00379                 
00380         
00381         
00382         
00386         void clearAttFreq ();
00387         
00388 
00389 
00390         
00391         // ===> Attribute attSpectrum, which is optional
00392         
00393         
00394         
00399         bool isAttSpectrumExists() const;
00400         
00401 
00402         
00408         vector<Complex > getAttSpectrum() const;
00409         
00410  
00411         
00412         
00419         void setAttSpectrum (vector<Complex > attSpectrum);
00420                 
00421         
00422         
00423         
00427         void clearAttSpectrum ();
00428         
00429 
00430 
00432         // Extrinsic Table Attributes //
00434         
00435         
00436         // ===> Attribute antennaId
00437         
00438         
00439         
00440 
00441         
00446         Tag getAntennaId() const;
00447         
00448  
00449         
00450         
00460         void setAntennaId (Tag antennaId);
00461                 
00462         
00463         
00464         
00465 
00466 
00467         
00468         // ===> Attribute feedId
00469         
00470         
00471         
00472 
00473         
00478         int getFeedId() const;
00479         
00480  
00481         
00482         
00492         void setFeedId (int feedId);
00493                 
00494         
00495         
00496         
00497 
00498 
00499         
00500         // ===> Attribute spectralWindowId
00501         
00502         
00503         
00504 
00505         
00510         Tag getSpectralWindowId() const;
00511         
00512  
00513         
00514         
00524         void setSpectralWindowId (Tag spectralWindowId);
00525                 
00526         
00527         
00528         
00529 
00530 
00532         // Links //
00534         
00535         
00536 
00537         
00538                 
00545          AntennaRow* getAntennaUsingAntennaId();
00546          
00547 
00548         
00549 
00550         
00551 
00552         
00553                 
00560          SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00561          
00562 
00563         
00564 
00565         
00566 
00567         
00568                 
00569         // ===> Slice link from a row of GainTracking table to a collection of row of Feed table.
00570         
00576         vector <FeedRow *> getFeeds();
00577         
00578         
00579 
00580         
00581 
00582         
00583         
00584         
00604         bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numReceptor, vector<float > attenuator, vector<PolarizationTypeMod::PolarizationType > polarizationType);
00605         
00606         
00607 
00608         
00620         bool compareRequiredValue(int numReceptor, vector<float > attenuator, vector<PolarizationTypeMod::PolarizationType > polarizationType); 
00621                  
00622         
00631         bool equalByRequiredValue(GainTrackingRow* x) ;
00632         
00633 #ifndef WITHOUT_ACS
00634 
00638         asdmIDL::GainTrackingRowIDL *toIDL() const;
00639         
00647          void toIDL(asdmIDL::GainTrackingRowIDL& x) const;
00648 #endif
00649         
00650 #ifndef WITHOUT_ACS
00651 
00656         void setFromIDL (asdmIDL::GainTrackingRowIDL x) ;
00657 #endif
00658         
00663         std::string toXML() const;
00664 
00671         void setFromXML (std::string rowDoc) ;
00672 
00675         // binary-deserialization material from an EndianIStream  //
00677 
00678         std::map<std::string, GainTrackingAttributeFromBin> fromBinMethods;
00679 void antennaIdFromBin( EndianIStream& eis);
00680 void spectralWindowIdFromBin( EndianIStream& eis);
00681 void timeIntervalFromBin( EndianIStream& eis);
00682 void feedIdFromBin( EndianIStream& eis);
00683 void numReceptorFromBin( EndianIStream& eis);
00684 void attenuatorFromBin( EndianIStream& eis);
00685 void polarizationTypeFromBin( EndianIStream& eis);
00686 
00687 void samplingLevelFromBin( EndianIStream& eis);
00688 void numAttFreqFromBin( EndianIStream& eis);
00689 void attFreqFromBin( EndianIStream& eis);
00690 void attSpectrumFromBin( EndianIStream& eis);
00691 
00692 
00700          static GainTrackingRow* fromBin(EndianIStream& eis, GainTrackingTable& table, const std::vector<std::string>& attributesSeq);   
00701  
00708          void fromText(const std::string& attributeName, const std::string&  t);
00710 
00711 private:
00715         GainTrackingTable &table;
00719         bool hasBeenAdded;
00720 
00721         // This method is used by the Table class when this row is added to the table.
00722         void isAdded(bool added);
00723 
00724 
00733         GainTrackingRow (GainTrackingTable &table);
00734 
00752          GainTrackingRow (GainTrackingTable &table, GainTrackingRow &row);
00753                 
00755         // Intrinsic Table Attributes //
00757         
00758         
00759         // ===> Attribute timeInterval
00760         
00761         
00762 
00763         ArrayTimeInterval timeInterval;
00764 
00765         
00766         
00767         
00768 
00769         
00770         // ===> Attribute numReceptor
00771         
00772         
00773 
00774         int numReceptor;
00775 
00776         
00777         
00778         
00779 
00780         
00781         // ===> Attribute attenuator
00782         
00783         
00784 
00785         vector<float > attenuator;
00786 
00787         
00788         
00789         
00790 
00791         
00792         // ===> Attribute polarizationType
00793         
00794         
00795 
00796         vector<PolarizationTypeMod::PolarizationType > polarizationType;
00797 
00798         
00799         
00800         
00801 
00802         
00803         // ===> Attribute samplingLevel, which is optional
00804         
00805         
00806         bool samplingLevelExists;
00807         
00808 
00809         float samplingLevel;
00810 
00811         
00812         
00813         
00814 
00815         
00816         // ===> Attribute numAttFreq, which is optional
00817         
00818         
00819         bool numAttFreqExists;
00820         
00821 
00822         int numAttFreq;
00823 
00824         
00825         
00826         
00827 
00828         
00829         // ===> Attribute attFreq, which is optional
00830         
00831         
00832         bool attFreqExists;
00833         
00834 
00835         vector<double > attFreq;
00836 
00837         
00838         
00839         
00840 
00841         
00842         // ===> Attribute attSpectrum, which is optional
00843         
00844         
00845         bool attSpectrumExists;
00846         
00847 
00848         vector<Complex > attSpectrum;
00849 
00850         
00851         
00852         
00853 
00855         // Extrinsic Table Attributes //
00857         
00858         
00859         // ===> Attribute antennaId
00860         
00861         
00862 
00863         Tag antennaId;
00864 
00865         
00866         
00867         
00868 
00869         
00870         // ===> Attribute feedId
00871         
00872         
00873 
00874         int feedId;
00875 
00876         
00877         
00878         
00879 
00880         
00881         // ===> Attribute spectralWindowId
00882         
00883         
00884 
00885         Tag spectralWindowId;
00886 
00887         
00888         
00889         
00890 
00892         // Links //
00894         
00895         
00896                 
00897 
00898          
00899 
00900         
00901 
00902         
00903                 
00904 
00905          
00906 
00907         
00908 
00909         
00910                 
00911 
00912 
00913         
00914 
00915         
00916 /*
00918         // binary-deserialization material from an EndianIStream  //
00920         std::map<std::string, GainTrackingAttributeFromBin> fromBinMethods;
00921 void antennaIdFromBin( EndianIStream& eis);
00922 void spectralWindowIdFromBin( EndianIStream& eis);
00923 void timeIntervalFromBin( EndianIStream& eis);
00924 void feedIdFromBin( EndianIStream& eis);
00925 void numReceptorFromBin( EndianIStream& eis);
00926 void attenuatorFromBin( EndianIStream& eis);
00927 void polarizationTypeFromBin( EndianIStream& eis);
00928 
00929 void samplingLevelFromBin( EndianIStream& eis);
00930 void numAttFreqFromBin( EndianIStream& eis);
00931 void attFreqFromBin( EndianIStream& eis);
00932 void attSpectrumFromBin( EndianIStream& eis);
00933 
00934 */
00935         
00937         // text-deserialization material //
00939         std::map<std::string, GainTrackingAttributeFromText> fromTextMethods;
00940         
00941 void antennaIdFromText (const string & s);
00942         
00943         
00944 void spectralWindowIdFromText (const string & s);
00945         
00946         
00947 void timeIntervalFromText (const string & s);
00948         
00949         
00950 void feedIdFromText (const string & s);
00951         
00952         
00953 void numReceptorFromText (const string & s);
00954         
00955         
00956 void attenuatorFromText (const string & s);
00957         
00958         
00959 void polarizationTypeFromText (const string & s);
00960         
00961 
00962         
00963 void samplingLevelFromText (const string & s);
00964         
00965         
00966 void numAttFreqFromText (const string & s);
00967         
00968         
00969 void attFreqFromText (const string & s);
00970         
00971         
00972 void attSpectrumFromText (const string & s);
00973         
00974         
00975         
00980          void toBin(EndianOSStream& eoss);
00981                  
00991 };
00992 
00993 } // End namespace asdm
00994 
00995 #endif /* GainTracking_CLASS */