casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SysPowerRow.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 SysPowerRow.h
00032  */
00033  
00034 #ifndef SysPowerRow_CLASS
00035 #define SysPowerRow_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 
00060 
00061         
00062 
00063         
00064 
00065         
00066 
00067         
00068 
00069         
00070 
00071 
00072 
00073 #include <ConversionException.h>
00074 #include <NoSuchRow.h>
00075 #include <IllegalAccessException.h>
00076 
00077 #include <RowTransformer.h>
00078 //#include <TableStreamReader.h>
00079 
00080 /*\file SysPower.h
00081     \brief Generated from model's revision "1.64", branch "HEAD"
00082 */
00083 
00084 namespace asdm {
00085 
00086 //class asdm::SysPowerTable;
00087 
00088 
00089 // class asdm::AntennaRow;
00090 class AntennaRow;
00091 
00092 // class asdm::SpectralWindowRow;
00093 class SpectralWindowRow;
00094 
00095 // class asdm::FeedRow;
00096 class FeedRow;
00097         
00098 
00099 class SysPowerRow;
00100 typedef void (SysPowerRow::*SysPowerAttributeFromBin) (EndianIStream& eis);
00101 typedef void (SysPowerRow::*SysPowerAttributeFromText) (const string& s);
00102 
00109 class SysPowerRow {
00110 friend class asdm::SysPowerTable;
00111 friend class asdm::RowTransformer<SysPowerRow>;
00112 //friend class asdm::TableStreamReader<SysPowerTable, SysPowerRow>;
00113 
00114 public:
00115 
00116         virtual ~SysPowerRow();
00117 
00121         SysPowerTable &getTable() const;
00122         
00127         bool isAdded() const;
00128                 
00130         // Intrinsic Table Attributes //
00132         
00133         
00134         // ===> Attribute timeInterval
00135         
00136         
00137         
00138 
00139         
00144         ArrayTimeInterval getTimeInterval() const;
00145         
00146  
00147         
00148         
00158         void setTimeInterval (ArrayTimeInterval timeInterval);
00159                 
00160         
00161         
00162         
00163 
00164 
00165         
00166         // ===> Attribute numReceptor
00167         
00168         
00169         
00170 
00171         
00176         int getNumReceptor() const;
00177         
00178  
00179         
00180         
00188         void setNumReceptor (int numReceptor);
00189                 
00190         
00191         
00192         
00193 
00194 
00195         
00196         // ===> Attribute switchedPowerDifference, which is optional
00197         
00198         
00199         
00204         bool isSwitchedPowerDifferenceExists() const;
00205         
00206 
00207         
00213         vector<float > getSwitchedPowerDifference() const;
00214         
00215  
00216         
00217         
00224         void setSwitchedPowerDifference (vector<float > switchedPowerDifference);
00225                 
00226         
00227         
00228         
00232         void clearSwitchedPowerDifference ();
00233         
00234 
00235 
00236         
00237         // ===> Attribute switchedPowerSum, which is optional
00238         
00239         
00240         
00245         bool isSwitchedPowerSumExists() const;
00246         
00247 
00248         
00254         vector<float > getSwitchedPowerSum() const;
00255         
00256  
00257         
00258         
00265         void setSwitchedPowerSum (vector<float > switchedPowerSum);
00266                 
00267         
00268         
00269         
00273         void clearSwitchedPowerSum ();
00274         
00275 
00276 
00277         
00278         // ===> Attribute requantizerGain, which is optional
00279         
00280         
00281         
00286         bool isRequantizerGainExists() const;
00287         
00288 
00289         
00295         vector<float > getRequantizerGain() const;
00296         
00297  
00298         
00299         
00306         void setRequantizerGain (vector<float > requantizerGain);
00307                 
00308         
00309         
00310         
00314         void clearRequantizerGain ();
00315         
00316 
00317 
00319         // Extrinsic Table Attributes //
00321         
00322         
00323         // ===> Attribute antennaId
00324         
00325         
00326         
00327 
00328         
00333         Tag getAntennaId() const;
00334         
00335  
00336         
00337         
00347         void setAntennaId (Tag antennaId);
00348                 
00349         
00350         
00351         
00352 
00353 
00354         
00355         // ===> Attribute feedId
00356         
00357         
00358         
00359 
00360         
00365         int getFeedId() const;
00366         
00367  
00368         
00369         
00379         void setFeedId (int feedId);
00380                 
00381         
00382         
00383         
00384 
00385 
00386         
00387         // ===> Attribute spectralWindowId
00388         
00389         
00390         
00391 
00392         
00397         Tag getSpectralWindowId() const;
00398         
00399  
00400         
00401         
00411         void setSpectralWindowId (Tag spectralWindowId);
00412                 
00413         
00414         
00415         
00416 
00417 
00419         // Links //
00421         
00422         
00423 
00424         
00425                 
00432          AntennaRow* getAntennaUsingAntennaId();
00433          
00434 
00435         
00436 
00437         
00438 
00439         
00440                 
00447          SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00448          
00449 
00450         
00451 
00452         
00453 
00454         
00455                 
00456         // ===> Slice link from a row of SysPower table to a collection of row of Feed table.
00457         
00463         vector <FeedRow *> getFeeds();
00464         
00465         
00466 
00467         
00468 
00469         
00470         
00471         
00487         bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, int feedId, ArrayTimeInterval timeInterval, int numReceptor);
00488         
00489         
00490 
00491         
00499         bool compareRequiredValue(int numReceptor); 
00500                  
00501         
00510         bool equalByRequiredValue(SysPowerRow* x) ;
00511         
00512 #ifndef WITHOUT_ACS
00513 
00517         asdmIDL::SysPowerRowIDL *toIDL() const;
00518         
00526          void toIDL(asdmIDL::SysPowerRowIDL& x) const;
00527 #endif
00528         
00529 #ifndef WITHOUT_ACS
00530 
00535         void setFromIDL (asdmIDL::SysPowerRowIDL x) ;
00536 #endif
00537         
00542         std::string toXML() const;
00543 
00550         void setFromXML (std::string rowDoc) ;
00551 
00554         // binary-deserialization material from an EndianIStream  //
00556 
00557         std::map<std::string, SysPowerAttributeFromBin> fromBinMethods;
00558 void antennaIdFromBin( EndianIStream& eis);
00559 void spectralWindowIdFromBin( EndianIStream& eis);
00560 void feedIdFromBin( EndianIStream& eis);
00561 void timeIntervalFromBin( EndianIStream& eis);
00562 void numReceptorFromBin( EndianIStream& eis);
00563 
00564 void switchedPowerDifferenceFromBin( EndianIStream& eis);
00565 void switchedPowerSumFromBin( EndianIStream& eis);
00566 void requantizerGainFromBin( EndianIStream& eis);
00567 
00568 
00576          static SysPowerRow* fromBin(EndianIStream& eis, SysPowerTable& table, const std::vector<std::string>& attributesSeq);   
00577  
00584          void fromText(const std::string& attributeName, const std::string&  t);
00586 
00587 private:
00591         SysPowerTable &table;
00595         bool hasBeenAdded;
00596 
00597         // This method is used by the Table class when this row is added to the table.
00598         void isAdded(bool added);
00599 
00600 
00609         SysPowerRow (SysPowerTable &table);
00610 
00628          SysPowerRow (SysPowerTable &table, SysPowerRow &row);
00629                 
00631         // Intrinsic Table Attributes //
00633         
00634         
00635         // ===> Attribute timeInterval
00636         
00637         
00638 
00639         ArrayTimeInterval timeInterval;
00640 
00641         
00642         
00643         
00644 
00645         
00646         // ===> Attribute numReceptor
00647         
00648         
00649 
00650         int numReceptor;
00651 
00652         
00653         
00654         
00655 
00656         
00657         // ===> Attribute switchedPowerDifference, which is optional
00658         
00659         
00660         bool switchedPowerDifferenceExists;
00661         
00662 
00663         vector<float > switchedPowerDifference;
00664 
00665         
00666         
00667         
00668 
00669         
00670         // ===> Attribute switchedPowerSum, which is optional
00671         
00672         
00673         bool switchedPowerSumExists;
00674         
00675 
00676         vector<float > switchedPowerSum;
00677 
00678         
00679         
00680         
00681 
00682         
00683         // ===> Attribute requantizerGain, which is optional
00684         
00685         
00686         bool requantizerGainExists;
00687         
00688 
00689         vector<float > requantizerGain;
00690 
00691         
00692         
00693         
00694 
00696         // Extrinsic Table Attributes //
00698         
00699         
00700         // ===> Attribute antennaId
00701         
00702         
00703 
00704         Tag antennaId;
00705 
00706         
00707         
00708         
00709 
00710         
00711         // ===> Attribute feedId
00712         
00713         
00714 
00715         int feedId;
00716 
00717         
00718         
00719         
00720 
00721         
00722         // ===> Attribute spectralWindowId
00723         
00724         
00725 
00726         Tag spectralWindowId;
00727 
00728         
00729         
00730         
00731 
00733         // Links //
00735         
00736         
00737                 
00738 
00739          
00740 
00741         
00742 
00743         
00744                 
00745 
00746          
00747 
00748         
00749 
00750         
00751                 
00752 
00753 
00754         
00755 
00756         
00757 /*
00759         // binary-deserialization material from an EndianIStream  //
00761         std::map<std::string, SysPowerAttributeFromBin> fromBinMethods;
00762 void antennaIdFromBin( EndianIStream& eis);
00763 void spectralWindowIdFromBin( EndianIStream& eis);
00764 void feedIdFromBin( EndianIStream& eis);
00765 void timeIntervalFromBin( EndianIStream& eis);
00766 void numReceptorFromBin( EndianIStream& eis);
00767 
00768 void switchedPowerDifferenceFromBin( EndianIStream& eis);
00769 void switchedPowerSumFromBin( EndianIStream& eis);
00770 void requantizerGainFromBin( EndianIStream& eis);
00771 
00772 */
00773         
00775         // text-deserialization material //
00777         std::map<std::string, SysPowerAttributeFromText> fromTextMethods;
00778         
00779 void antennaIdFromText (const string & s);
00780         
00781         
00782 void spectralWindowIdFromText (const string & s);
00783         
00784         
00785 void feedIdFromText (const string & s);
00786         
00787         
00788 void timeIntervalFromText (const string & s);
00789         
00790         
00791 void numReceptorFromText (const string & s);
00792         
00793 
00794         
00795 void switchedPowerDifferenceFromText (const string & s);
00796         
00797         
00798 void switchedPowerSumFromText (const string & s);
00799         
00800         
00801 void requantizerGainFromText (const string & s);
00802         
00803         
00804         
00809          void toBin(EndianOSStream& eoss);
00810                  
00820 };
00821 
00822 } // End namespace asdm
00823 
00824 #endif /* SysPower_CLASS */