casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
FreqOffsetRow.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 FreqOffsetRow.h
00032  */
00033  
00034 #ifndef FreqOffsetRow_CLASS
00035 #define FreqOffsetRow_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 <Frequency.h>
00056         
00057 
00058          
00059 #include <ArrayTimeInterval.h>
00060         
00061 
00062 
00063 
00064 
00065         
00066 
00067         
00068 
00069 
00070 
00071 #include <ConversionException.h>
00072 #include <NoSuchRow.h>
00073 #include <IllegalAccessException.h>
00074 
00075 #include <RowTransformer.h>
00076 //#include <TableStreamReader.h>
00077 
00078 /*\file FreqOffset.h
00079     \brief Generated from model's revision "1.64", branch "HEAD"
00080 */
00081 
00082 namespace asdm {
00083 
00084 //class asdm::FreqOffsetTable;
00085 
00086 
00087 // class asdm::AntennaRow;
00088 class AntennaRow;
00089 
00090 // class asdm::SpectralWindowRow;
00091 class SpectralWindowRow;
00092 
00093 // class asdm::FeedRow;
00094 class FeedRow;
00095         
00096 
00097 class FreqOffsetRow;
00098 typedef void (FreqOffsetRow::*FreqOffsetAttributeFromBin) (EndianIStream& eis);
00099 typedef void (FreqOffsetRow::*FreqOffsetAttributeFromText) (const string& s);
00100 
00107 class FreqOffsetRow {
00108 friend class asdm::FreqOffsetTable;
00109 friend class asdm::RowTransformer<FreqOffsetRow>;
00110 //friend class asdm::TableStreamReader<FreqOffsetTable, FreqOffsetRow>;
00111 
00112 public:
00113 
00114         virtual ~FreqOffsetRow();
00115 
00119         FreqOffsetTable &getTable() const;
00120         
00125         bool isAdded() const;
00126                 
00128         // Intrinsic Table Attributes //
00130         
00131         
00132         // ===> Attribute timeInterval
00133         
00134         
00135         
00136 
00137         
00142         ArrayTimeInterval getTimeInterval() const;
00143         
00144  
00145         
00146         
00156         void setTimeInterval (ArrayTimeInterval timeInterval);
00157                 
00158         
00159         
00160         
00161 
00162 
00163         
00164         // ===> Attribute offset
00165         
00166         
00167         
00168 
00169         
00174         Frequency getOffset() const;
00175         
00176  
00177         
00178         
00186         void setOffset (Frequency offset);
00187                 
00188         
00189         
00190         
00191 
00192 
00194         // Extrinsic Table Attributes //
00196         
00197         
00198         // ===> Attribute antennaId
00199         
00200         
00201         
00202 
00203         
00208         Tag getAntennaId() const;
00209         
00210  
00211         
00212         
00222         void setAntennaId (Tag antennaId);
00223                 
00224         
00225         
00226         
00227 
00228 
00229         
00230         // ===> Attribute feedId
00231         
00232         
00233         
00234 
00235         
00240         int getFeedId() const;
00241         
00242  
00243         
00244         
00254         void setFeedId (int feedId);
00255                 
00256         
00257         
00258         
00259 
00260 
00261         
00262         // ===> Attribute spectralWindowId
00263         
00264         
00265         
00266 
00267         
00272         Tag getSpectralWindowId() const;
00273         
00274  
00275         
00276         
00286         void setSpectralWindowId (Tag spectralWindowId);
00287                 
00288         
00289         
00290         
00291 
00292 
00294         // Links //
00296         
00297         
00298 
00299         
00300                 
00307          AntennaRow* getAntennaUsingAntennaId();
00308          
00309 
00310         
00311 
00312         
00313 
00314         
00315                 
00322          SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00323          
00324 
00325         
00326 
00327         
00328 
00329         
00330                 
00331         // ===> Slice link from a row of FreqOffset table to a collection of row of Feed table.
00332         
00338         vector <FeedRow *> getFeeds();
00339         
00340         
00341 
00342         
00343 
00344         
00345         
00346         
00362         bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, Frequency offset);
00363         
00364         
00365 
00366         
00374         bool compareRequiredValue(Frequency offset); 
00375                  
00376         
00385         bool equalByRequiredValue(FreqOffsetRow* x) ;
00386         
00387 #ifndef WITHOUT_ACS
00388 
00392         asdmIDL::FreqOffsetRowIDL *toIDL() const;
00393         
00401          void toIDL(asdmIDL::FreqOffsetRowIDL& x) const;
00402 #endif
00403         
00404 #ifndef WITHOUT_ACS
00405 
00410         void setFromIDL (asdmIDL::FreqOffsetRowIDL x) ;
00411 #endif
00412         
00417         std::string toXML() const;
00418 
00425         void setFromXML (std::string rowDoc) ;
00426 
00429         // binary-deserialization material from an EndianIStream  //
00431 
00432         std::map<std::string, FreqOffsetAttributeFromBin> fromBinMethods;
00433 void antennaIdFromBin( EndianIStream& eis);
00434 void spectralWindowIdFromBin( EndianIStream& eis);
00435 void timeIntervalFromBin( EndianIStream& eis);
00436 void feedIdFromBin( EndianIStream& eis);
00437 void offsetFromBin( EndianIStream& eis);
00438 
00439         
00440 
00448          static FreqOffsetRow* fromBin(EndianIStream& eis, FreqOffsetTable& table, const std::vector<std::string>& attributesSeq);       
00449  
00456          void fromText(const std::string& attributeName, const std::string&  t);
00458 
00459 private:
00463         FreqOffsetTable &table;
00467         bool hasBeenAdded;
00468 
00469         // This method is used by the Table class when this row is added to the table.
00470         void isAdded(bool added);
00471 
00472 
00481         FreqOffsetRow (FreqOffsetTable &table);
00482 
00500          FreqOffsetRow (FreqOffsetTable &table, FreqOffsetRow &row);
00501                 
00503         // Intrinsic Table Attributes //
00505         
00506         
00507         // ===> Attribute timeInterval
00508         
00509         
00510 
00511         ArrayTimeInterval timeInterval;
00512 
00513         
00514         
00515         
00516 
00517         
00518         // ===> Attribute offset
00519         
00520         
00521 
00522         Frequency offset;
00523 
00524         
00525         
00526         
00527 
00529         // Extrinsic Table Attributes //
00531         
00532         
00533         // ===> Attribute antennaId
00534         
00535         
00536 
00537         Tag antennaId;
00538 
00539         
00540         
00541         
00542 
00543         
00544         // ===> Attribute feedId
00545         
00546         
00547 
00548         int feedId;
00549 
00550         
00551         
00552         
00553 
00554         
00555         // ===> Attribute spectralWindowId
00556         
00557         
00558 
00559         Tag spectralWindowId;
00560 
00561         
00562         
00563         
00564 
00566         // Links //
00568         
00569         
00570                 
00571 
00572          
00573 
00574         
00575 
00576         
00577                 
00578 
00579          
00580 
00581         
00582 
00583         
00584                 
00585 
00586 
00587         
00588 
00589         
00590 /*
00592         // binary-deserialization material from an EndianIStream  //
00594         std::map<std::string, FreqOffsetAttributeFromBin> fromBinMethods;
00595 void antennaIdFromBin( EndianIStream& eis);
00596 void spectralWindowIdFromBin( EndianIStream& eis);
00597 void timeIntervalFromBin( EndianIStream& eis);
00598 void feedIdFromBin( EndianIStream& eis);
00599 void offsetFromBin( EndianIStream& eis);
00600 
00601         
00602 */
00603         
00605         // text-deserialization material //
00607         std::map<std::string, FreqOffsetAttributeFromText> fromTextMethods;
00608         
00609 void antennaIdFromText (const string & s);
00610         
00611         
00612 void spectralWindowIdFromText (const string & s);
00613         
00614         
00615 void timeIntervalFromText (const string & s);
00616         
00617         
00618 void feedIdFromText (const string & s);
00619         
00620         
00621 void offsetFromText (const string & s);
00622         
00623 
00624                 
00625         
00630          void toBin(EndianOSStream& eoss);
00631                  
00641 };
00642 
00643 } // End namespace asdm
00644 
00645 #endif /* FreqOffset_CLASS */