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.61", 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 #endif
00394         
00395 #ifndef WITHOUT_ACS
00396 
00401         void setFromIDL (asdmIDL::FreqOffsetRowIDL x) ;
00402 #endif
00403         
00408         std::string toXML() const;
00409 
00416         void setFromXML (std::string rowDoc) ;
00417 
00420         // binary-deserialization material from an EndianIStream  //
00422 
00423         std::map<std::string, FreqOffsetAttributeFromBin> fromBinMethods;
00424 void antennaIdFromBin( EndianIStream& eis);
00425 void spectralWindowIdFromBin( EndianIStream& eis);
00426 void timeIntervalFromBin( EndianIStream& eis);
00427 void feedIdFromBin( EndianIStream& eis);
00428 void offsetFromBin( EndianIStream& eis);
00429 
00430         
00431 
00439          static FreqOffsetRow* fromBin(EndianIStream& eis, FreqOffsetTable& table, const std::vector<std::string>& attributesSeq);       
00441 
00442 private:
00446         FreqOffsetTable &table;
00450         bool hasBeenAdded;
00451 
00452         // This method is used by the Table class when this row is added to the table.
00453         void isAdded(bool added);
00454 
00455 
00464         FreqOffsetRow (FreqOffsetTable &table);
00465 
00483          FreqOffsetRow (FreqOffsetTable &table, FreqOffsetRow &row);
00484                 
00486         // Intrinsic Table Attributes //
00488         
00489         
00490         // ===> Attribute timeInterval
00491         
00492         
00493 
00494         ArrayTimeInterval timeInterval;
00495 
00496         
00497         
00498         
00499 
00500         
00501         // ===> Attribute offset
00502         
00503         
00504 
00505         Frequency offset;
00506 
00507         
00508         
00509         
00510 
00512         // Extrinsic Table Attributes //
00514         
00515         
00516         // ===> Attribute antennaId
00517         
00518         
00519 
00520         Tag antennaId;
00521 
00522         
00523         
00524         
00525 
00526         
00527         // ===> Attribute feedId
00528         
00529         
00530 
00531         int feedId;
00532 
00533         
00534         
00535         
00536 
00537         
00538         // ===> Attribute spectralWindowId
00539         
00540         
00541 
00542         Tag spectralWindowId;
00543 
00544         
00545         
00546         
00547 
00549         // Links //
00551         
00552         
00553                 
00554 
00555          
00556 
00557         
00558 
00559         
00560                 
00561 
00562          
00563 
00564         
00565 
00566         
00567                 
00568 
00569 
00570         
00571 
00572         
00573 /*
00575         // binary-deserialization material from an EndianIStream  //
00577         std::map<std::string, FreqOffsetAttributeFromBin> fromBinMethods;
00578 void antennaIdFromBin( EndianIStream& eis);
00579 void spectralWindowIdFromBin( EndianIStream& eis);
00580 void timeIntervalFromBin( EndianIStream& eis);
00581 void feedIdFromBin( EndianIStream& eis);
00582 void offsetFromBin( EndianIStream& eis);
00583 
00584         
00585 */
00586         
00588         // text-deserialization material //
00590         std::map<std::string, FreqOffsetAttributeFromText> fromTextMethods;
00591         
00592 void antennaIdFromText (const string & s);
00593         
00594         
00595 void spectralWindowIdFromText (const string & s);
00596         
00597         
00598 void timeIntervalFromText (const string & s);
00599         
00600         
00601 void feedIdFromText (const string & s);
00602         
00603         
00604 void offsetFromText (const string & s);
00605         
00606 
00607                 
00608         
00609         void fromText(const std::string& attributeName, const std::string&  t);
00610         
00615          void toBin(EndianOSStream& eoss);
00616                  
00626 };
00627 
00628 } // End namespace asdm
00629 
00630 #endif /* FreqOffset_CLASS */