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.61", 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 #endif
00519         
00520 #ifndef WITHOUT_ACS
00521 
00526         void setFromIDL (asdmIDL::SysPowerRowIDL x) ;
00527 #endif
00528         
00533         std::string toXML() const;
00534 
00541         void setFromXML (std::string rowDoc) ;
00542 
00545         // binary-deserialization material from an EndianIStream  //
00547 
00548         std::map<std::string, SysPowerAttributeFromBin> fromBinMethods;
00549 void antennaIdFromBin( EndianIStream& eis);
00550 void spectralWindowIdFromBin( EndianIStream& eis);
00551 void feedIdFromBin( EndianIStream& eis);
00552 void timeIntervalFromBin( EndianIStream& eis);
00553 void numReceptorFromBin( EndianIStream& eis);
00554 
00555 void switchedPowerDifferenceFromBin( EndianIStream& eis);
00556 void switchedPowerSumFromBin( EndianIStream& eis);
00557 void requantizerGainFromBin( EndianIStream& eis);
00558 
00559 
00567          static SysPowerRow* fromBin(EndianIStream& eis, SysPowerTable& table, const std::vector<std::string>& attributesSeq);   
00569 
00570 private:
00574         SysPowerTable &table;
00578         bool hasBeenAdded;
00579 
00580         // This method is used by the Table class when this row is added to the table.
00581         void isAdded(bool added);
00582 
00583 
00592         SysPowerRow (SysPowerTable &table);
00593 
00611          SysPowerRow (SysPowerTable &table, SysPowerRow &row);
00612                 
00614         // Intrinsic Table Attributes //
00616         
00617         
00618         // ===> Attribute timeInterval
00619         
00620         
00621 
00622         ArrayTimeInterval timeInterval;
00623 
00624         
00625         
00626         
00627 
00628         
00629         // ===> Attribute numReceptor
00630         
00631         
00632 
00633         int numReceptor;
00634 
00635         
00636         
00637         
00638 
00639         
00640         // ===> Attribute switchedPowerDifference, which is optional
00641         
00642         
00643         bool switchedPowerDifferenceExists;
00644         
00645 
00646         vector<float > switchedPowerDifference;
00647 
00648         
00649         
00650         
00651 
00652         
00653         // ===> Attribute switchedPowerSum, which is optional
00654         
00655         
00656         bool switchedPowerSumExists;
00657         
00658 
00659         vector<float > switchedPowerSum;
00660 
00661         
00662         
00663         
00664 
00665         
00666         // ===> Attribute requantizerGain, which is optional
00667         
00668         
00669         bool requantizerGainExists;
00670         
00671 
00672         vector<float > requantizerGain;
00673 
00674         
00675         
00676         
00677 
00679         // Extrinsic Table Attributes //
00681         
00682         
00683         // ===> Attribute antennaId
00684         
00685         
00686 
00687         Tag antennaId;
00688 
00689         
00690         
00691         
00692 
00693         
00694         // ===> Attribute feedId
00695         
00696         
00697 
00698         int feedId;
00699 
00700         
00701         
00702         
00703 
00704         
00705         // ===> Attribute spectralWindowId
00706         
00707         
00708 
00709         Tag spectralWindowId;
00710 
00711         
00712         
00713         
00714 
00716         // Links //
00718         
00719         
00720                 
00721 
00722          
00723 
00724         
00725 
00726         
00727                 
00728 
00729          
00730 
00731         
00732 
00733         
00734                 
00735 
00736 
00737         
00738 
00739         
00740 /*
00742         // binary-deserialization material from an EndianIStream  //
00744         std::map<std::string, SysPowerAttributeFromBin> fromBinMethods;
00745 void antennaIdFromBin( EndianIStream& eis);
00746 void spectralWindowIdFromBin( EndianIStream& eis);
00747 void feedIdFromBin( EndianIStream& eis);
00748 void timeIntervalFromBin( EndianIStream& eis);
00749 void numReceptorFromBin( EndianIStream& eis);
00750 
00751 void switchedPowerDifferenceFromBin( EndianIStream& eis);
00752 void switchedPowerSumFromBin( EndianIStream& eis);
00753 void requantizerGainFromBin( EndianIStream& eis);
00754 
00755 */
00756         
00758         // text-deserialization material //
00760         std::map<std::string, SysPowerAttributeFromText> fromTextMethods;
00761         
00762 void antennaIdFromText (const string & s);
00763         
00764         
00765 void spectralWindowIdFromText (const string & s);
00766         
00767         
00768 void feedIdFromText (const string & s);
00769         
00770         
00771 void timeIntervalFromText (const string & s);
00772         
00773         
00774 void numReceptorFromText (const string & s);
00775         
00776 
00777         
00778 void switchedPowerDifferenceFromText (const string & s);
00779         
00780         
00781 void switchedPowerSumFromText (const string & s);
00782         
00783         
00784 void requantizerGainFromText (const string & s);
00785         
00786         
00787         
00788         void fromText(const std::string& attributeName, const std::string&  t);
00789         
00794          void toBin(EndianOSStream& eoss);
00795                  
00805 };
00806 
00807 } // End namespace asdm
00808 
00809 #endif /* SysPower_CLASS */