AntennaRow.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 AntennaRow.h
00032  */
00033  
00034 #ifndef AntennaRow_CLASS
00035 #define AntennaRow_CLASS
00036 
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 using std::vector;
00041 using std::string;
00042 using std::set;
00043 
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::AntennaRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <ArrayTime.h>
00055 using  asdm::ArrayTime;
00056 
00057 #include <Tag.h>
00058 using  asdm::Tag;
00059 
00060 #include <Length.h>
00061 using  asdm::Length;
00062 
00063 
00064 
00065 
00066         
00067 
00068         
00069 
00070         
00071 #include "CAntennaMake.h"
00072 using namespace AntennaMakeMod;
00073         
00074 
00075         
00076 #include "CAntennaType.h"
00077 using namespace AntennaTypeMod;
00078         
00079 
00080         
00081 
00082         
00083 
00084         
00085 
00086         
00087 
00088 
00089 
00090 #include <ConversionException.h>
00091 #include <NoSuchRow.h>
00092 #include <IllegalAccessException.h>
00093 
00094 
00095 /*\file Antenna.h
00096     \brief Generated from model's revision "1.55", branch "HEAD"
00097 */
00098 
00099 namespace asdm {
00100 
00101 //class asdm::AntennaTable;
00102 
00103 
00104 // class asdm::AntennaRow;
00105 class AntennaRow;
00106 
00107 // class asdm::StationRow;
00108 class StationRow;
00109         
00110 
00111 class AntennaRow;
00112 typedef void (AntennaRow::*AntennaAttributeFromBin) (EndianISStream& eiss);
00113 
00120 class AntennaRow {
00121 friend class asdm::AntennaTable;
00122 
00123 public:
00124 
00125         virtual ~AntennaRow();
00126 
00130         AntennaTable &getTable() const;
00131         
00136         bool isAdded() const;
00137                 
00139         // Intrinsic Table Attributes //
00141         
00142         
00143         // ===> Attribute antennaId
00144         
00145         
00146         
00147 
00148         
00153         Tag getAntennaId() const;
00154         
00155  
00156         
00157         
00158         
00159         
00160 
00161 
00162         
00163         // ===> Attribute name
00164         
00165         
00166         
00167 
00168         
00173         string getName() const;
00174         
00175  
00176         
00177         
00185         void setName (string name);
00186                 
00187         
00188         
00189         
00190 
00191 
00192         
00193         // ===> Attribute antennaMake
00194         
00195         
00196         
00197 
00198         
00203         AntennaMakeMod::AntennaMake getAntennaMake() const;
00204         
00205  
00206         
00207         
00215         void setAntennaMake (AntennaMakeMod::AntennaMake antennaMake);
00216                 
00217         
00218         
00219         
00220 
00221 
00222         
00223         // ===> Attribute antennaType
00224         
00225         
00226         
00227 
00228         
00233         AntennaTypeMod::AntennaType getAntennaType() const;
00234         
00235  
00236         
00237         
00245         void setAntennaType (AntennaTypeMod::AntennaType antennaType);
00246                 
00247         
00248         
00249         
00250 
00251 
00252         
00253         // ===> Attribute dishDiameter
00254         
00255         
00256         
00257 
00258         
00263         Length getDishDiameter() const;
00264         
00265  
00266         
00267         
00275         void setDishDiameter (Length dishDiameter);
00276                 
00277         
00278         
00279         
00280 
00281 
00282         
00283         // ===> Attribute position
00284         
00285         
00286         
00287 
00288         
00293         vector<Length > getPosition() const;
00294         
00295  
00296         
00297         
00305         void setPosition (vector<Length > position);
00306                 
00307         
00308         
00309         
00310 
00311 
00312         
00313         // ===> Attribute offset
00314         
00315         
00316         
00317 
00318         
00323         vector<Length > getOffset() const;
00324         
00325  
00326         
00327         
00335         void setOffset (vector<Length > offset);
00336                 
00337         
00338         
00339         
00340 
00341 
00342         
00343         // ===> Attribute time
00344         
00345         
00346         
00347 
00348         
00353         ArrayTime getTime() const;
00354         
00355  
00356         
00357         
00365         void setTime (ArrayTime time);
00366                 
00367         
00368         
00369         
00370 
00371 
00373         // Extrinsic Table Attributes //
00375         
00376         
00377         // ===> Attribute assocAntennaId, which is optional
00378         
00379         
00380         
00385         bool isAssocAntennaIdExists() const;
00386         
00387 
00388         
00394         Tag getAssocAntennaId() const;
00395         
00396  
00397         
00398         
00405         void setAssocAntennaId (Tag assocAntennaId);
00406                 
00407         
00408         
00409         
00413         void clearAssocAntennaId ();
00414         
00415 
00416 
00417         
00418         // ===> Attribute stationId
00419         
00420         
00421         
00422 
00423         
00428         Tag getStationId() const;
00429         
00430  
00431         
00432         
00440         void setStationId (Tag stationId);
00441                 
00442         
00443         
00444         
00445 
00446 
00448         // Links //
00450         
00451         
00452 
00453         
00454                 
00455                 
00456                         
00457         // ===> Optional link from a row of Antenna table to a row of Antenna table.
00458 
00463         bool isAssociatedAntennaExists() const;
00464 
00470         AntennaRow *getAssociatedAntenna() const;
00471         
00475         void setAssociatedAntennaLink(Tag assocAntennaId);
00476 
00477 
00478                 
00479                 
00480         
00481 
00482         
00483 
00484         
00485                 
00492          StationRow* getStationUsingStationId();
00493          
00494 
00495         
00496 
00497         
00498         
00499         
00521         bool compareNoAutoInc(string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, vector<Length > position, vector<Length > offset, ArrayTime time, Tag stationId);
00522         
00523         
00524 
00525         
00547         bool compareRequiredValue(string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, vector<Length > position, vector<Length > offset, ArrayTime time, Tag stationId); 
00548                  
00549         
00558         bool equalByRequiredValue(AntennaRow* x) ;
00559         
00560 #ifndef WITHOUT_ACS
00561 
00565         AntennaRowIDL *toIDL() const;
00566 #endif
00567         
00568 #ifndef WITHOUT_ACS
00569 
00574         void setFromIDL (AntennaRowIDL x) ;
00575 #endif
00576         
00581         string toXML() const;
00582 
00589         void setFromXML (string rowDoc) ;       
00590 
00591 private:
00595         AntennaTable &table;
00599         bool hasBeenAdded;
00600 
00601         // This method is used by the Table class when this row is added to the table.
00602         void isAdded(bool added);
00603 
00604 
00613         AntennaRow (AntennaTable &table);
00614 
00632          AntennaRow (AntennaTable &table, AntennaRow &row);
00633                 
00635         // Intrinsic Table Attributes //
00637         
00638         
00639         // ===> Attribute antennaId
00640         
00641         
00642 
00643         Tag antennaId;
00644 
00645         
00646         
00647         
00657         void setAntennaId (Tag antennaId);
00658                 
00659         
00660 
00661         
00662         // ===> Attribute name
00663         
00664         
00665 
00666         string name;
00667 
00668         
00669         
00670         
00671 
00672         
00673         // ===> Attribute antennaMake
00674         
00675         
00676 
00677         AntennaMakeMod::AntennaMake antennaMake;
00678 
00679         
00680         
00681         
00682 
00683         
00684         // ===> Attribute antennaType
00685         
00686         
00687 
00688         AntennaTypeMod::AntennaType antennaType;
00689 
00690         
00691         
00692         
00693 
00694         
00695         // ===> Attribute dishDiameter
00696         
00697         
00698 
00699         Length dishDiameter;
00700 
00701         
00702         
00703         
00704 
00705         
00706         // ===> Attribute position
00707         
00708         
00709 
00710         vector<Length > position;
00711 
00712         
00713         
00714         
00715 
00716         
00717         // ===> Attribute offset
00718         
00719         
00720 
00721         vector<Length > offset;
00722 
00723         
00724         
00725         
00726 
00727         
00728         // ===> Attribute time
00729         
00730         
00731 
00732         ArrayTime time;
00733 
00734         
00735         
00736         
00737 
00739         // Extrinsic Table Attributes //
00741         
00742         
00743         // ===> Attribute assocAntennaId, which is optional
00744         
00745         
00746         bool assocAntennaIdExists;
00747         
00748 
00749         Tag assocAntennaId;
00750 
00751         
00752         
00753         
00754 
00755         
00756         // ===> Attribute stationId
00757         
00758         
00759 
00760         Tag stationId;
00761 
00762         
00763         
00764         
00765 
00767         // Links //
00769         
00770                 
00771                 
00772         
00773 
00774         
00775                 
00776 
00777          
00778 
00779         
00780 
00781         
00783         // binary-deserialization material//
00785         map<string, AntennaAttributeFromBin> fromBinMethods;
00786 void antennaIdFromBin( EndianISStream& eiss);
00787 void nameFromBin( EndianISStream& eiss);
00788 void antennaMakeFromBin( EndianISStream& eiss);
00789 void antennaTypeFromBin( EndianISStream& eiss);
00790 void dishDiameterFromBin( EndianISStream& eiss);
00791 void positionFromBin( EndianISStream& eiss);
00792 void offsetFromBin( EndianISStream& eiss);
00793 void timeFromBin( EndianISStream& eiss);
00794 void stationIdFromBin( EndianISStream& eiss);
00795 
00796 void assocAntennaIdFromBin( EndianISStream& eiss);
00797         
00798         
00803          void toBin(EndianOSStream& eoss);
00804                  
00812          static AntennaRow* fromBin(EndianISStream& eiss, AntennaTable& table, const vector<string>& attributesSeq);     
00813 
00814 };
00815 
00816 } // End namespace asdm
00817 
00818 #endif /* Antenna_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines