casa  $Rev:20696$
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 
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044 
00045 
00046 
00047 
00048 
00049 
00050          
00051 #include <ArrayTime.h>
00052         
00053 
00054          
00055 #include <Tag.h>
00056         
00057 
00058          
00059 #include <Length.h>
00060         
00061 
00062 
00063 
00064 
00065         
00066 
00067         
00068 
00069         
00070 #include "CAntennaMake.h"
00071         
00072 
00073         
00074 #include "CAntennaType.h"
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085 
00086 
00087 #include <ConversionException.h>
00088 #include <NoSuchRow.h>
00089 #include <IllegalAccessException.h>
00090 
00091 #include <RowTransformer.h>
00092 //#include <TableStreamReader.h>
00093 
00094 /*\file Antenna.h
00095     \brief Generated from model's revision "1.62", branch "HEAD"
00096 */
00097 
00098 namespace asdm {
00099 
00100 //class asdm::AntennaTable;
00101 
00102 
00103 // class asdm::AntennaRow;
00104 class AntennaRow;
00105 
00106 // class asdm::StationRow;
00107 class StationRow;
00108         
00109 
00110 class AntennaRow;
00111 typedef void (AntennaRow::*AntennaAttributeFromBin) (EndianIStream& eis);
00112 typedef void (AntennaRow::*AntennaAttributeFromText) (const string& s);
00113 
00120 class AntennaRow {
00121 friend class asdm::AntennaTable;
00122 friend class asdm::RowTransformer<AntennaRow>;
00123 //friend class asdm::TableStreamReader<AntennaTable, AntennaRow>;
00124 
00125 public:
00126 
00127         virtual ~AntennaRow();
00128 
00132         AntennaTable &getTable() const;
00133         
00138         bool isAdded() const;
00139                 
00141         // Intrinsic Table Attributes //
00143         
00144         
00145         // ===> Attribute antennaId
00146         
00147         
00148         
00149 
00150         
00155         Tag getAntennaId() const;
00156         
00157  
00158         
00159         
00160         
00161         
00162 
00163 
00164         
00165         // ===> Attribute name
00166         
00167         
00168         
00169 
00170         
00175         string getName() const;
00176         
00177  
00178         
00179         
00187         void setName (string name);
00188                 
00189         
00190         
00191         
00192 
00193 
00194         
00195         // ===> Attribute antennaMake
00196         
00197         
00198         
00199 
00200         
00205         AntennaMakeMod::AntennaMake getAntennaMake() const;
00206         
00207  
00208         
00209         
00217         void setAntennaMake (AntennaMakeMod::AntennaMake antennaMake);
00218                 
00219         
00220         
00221         
00222 
00223 
00224         
00225         // ===> Attribute antennaType
00226         
00227         
00228         
00229 
00230         
00235         AntennaTypeMod::AntennaType getAntennaType() const;
00236         
00237  
00238         
00239         
00247         void setAntennaType (AntennaTypeMod::AntennaType antennaType);
00248                 
00249         
00250         
00251         
00252 
00253 
00254         
00255         // ===> Attribute dishDiameter
00256         
00257         
00258         
00259 
00260         
00265         Length getDishDiameter() const;
00266         
00267  
00268         
00269         
00277         void setDishDiameter (Length dishDiameter);
00278                 
00279         
00280         
00281         
00282 
00283 
00284         
00285         // ===> Attribute position
00286         
00287         
00288         
00289 
00290         
00295         vector<Length > getPosition() const;
00296         
00297  
00298         
00299         
00307         void setPosition (vector<Length > position);
00308                 
00309         
00310         
00311         
00312 
00313 
00314         
00315         // ===> Attribute offset
00316         
00317         
00318         
00319 
00320         
00325         vector<Length > getOffset() const;
00326         
00327  
00328         
00329         
00337         void setOffset (vector<Length > offset);
00338                 
00339         
00340         
00341         
00342 
00343 
00344         
00345         // ===> Attribute time
00346         
00347         
00348         
00349 
00350         
00355         ArrayTime getTime() const;
00356         
00357  
00358         
00359         
00367         void setTime (ArrayTime time);
00368                 
00369         
00370         
00371         
00372 
00373 
00375         // Extrinsic Table Attributes //
00377         
00378         
00379         // ===> Attribute assocAntennaId, which is optional
00380         
00381         
00382         
00387         bool isAssocAntennaIdExists() const;
00388         
00389 
00390         
00396         Tag getAssocAntennaId() const;
00397         
00398  
00399         
00400         
00407         void setAssocAntennaId (Tag assocAntennaId);
00408                 
00409         
00410         
00411         
00415         void clearAssocAntennaId ();
00416         
00417 
00418 
00419         
00420         // ===> Attribute stationId
00421         
00422         
00423         
00424 
00425         
00430         Tag getStationId() const;
00431         
00432  
00433         
00434         
00442         void setStationId (Tag stationId);
00443                 
00444         
00445         
00446         
00447 
00448 
00450         // Links //
00452         
00453         
00454 
00455         
00456                 
00457                 
00458                         
00459         // ===> Optional link from a row of Antenna table to a row of Antenna table.
00460 
00465         bool isAssociatedAntennaExists() const;
00466 
00472         AntennaRow *getAssociatedAntenna() const;
00473         
00477         void setAssociatedAntennaLink(Tag assocAntennaId);
00478 
00479 
00480                 
00481                 
00482         
00483 
00484         
00485 
00486         
00487                 
00494          StationRow* getStationUsingStationId();
00495          
00496 
00497         
00498 
00499         
00500         
00501         
00523         bool compareNoAutoInc(string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, vector<Length > position, vector<Length > offset, ArrayTime time, Tag stationId);
00524         
00525         
00526 
00527         
00549         bool compareRequiredValue(string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length dishDiameter, vector<Length > position, vector<Length > offset, ArrayTime time, Tag stationId); 
00550                  
00551         
00560         bool equalByRequiredValue(AntennaRow* x) ;
00561         
00562 #ifndef WITHOUT_ACS
00563 
00567         asdmIDL::AntennaRowIDL *toIDL() const;
00568 #endif
00569         
00570 #ifndef WITHOUT_ACS
00571 
00576         void setFromIDL (asdmIDL::AntennaRowIDL x) ;
00577 #endif
00578         
00583         std::string toXML() const;
00584 
00591         void setFromXML (std::string rowDoc) ;
00592 
00595         // binary-deserialization material from an EndianIStream  //
00597 
00598         std::map<std::string, AntennaAttributeFromBin> fromBinMethods;
00599 void antennaIdFromBin( EndianIStream& eis);
00600 void nameFromBin( EndianIStream& eis);
00601 void antennaMakeFromBin( EndianIStream& eis);
00602 void antennaTypeFromBin( EndianIStream& eis);
00603 void dishDiameterFromBin( EndianIStream& eis);
00604 void positionFromBin( EndianIStream& eis);
00605 void offsetFromBin( EndianIStream& eis);
00606 void timeFromBin( EndianIStream& eis);
00607 void stationIdFromBin( EndianIStream& eis);
00608 
00609 void assocAntennaIdFromBin( EndianIStream& eis);
00610 
00611 
00619          static AntennaRow* fromBin(EndianIStream& eis, AntennaTable& table, const std::vector<std::string>& attributesSeq);     
00620  
00627          void fromText(const std::string& attributeName, const std::string&  t);
00629 
00630 private:
00634         AntennaTable &table;
00638         bool hasBeenAdded;
00639 
00640         // This method is used by the Table class when this row is added to the table.
00641         void isAdded(bool added);
00642 
00643 
00652         AntennaRow (AntennaTable &table);
00653 
00671          AntennaRow (AntennaTable &table, AntennaRow &row);
00672                 
00674         // Intrinsic Table Attributes //
00676         
00677         
00678         // ===> Attribute antennaId
00679         
00680         
00681 
00682         Tag antennaId;
00683 
00684         
00685         
00686         
00696         void setAntennaId (Tag antennaId);
00697                 
00698         
00699 
00700         
00701         // ===> Attribute name
00702         
00703         
00704 
00705         string name;
00706 
00707         
00708         
00709         
00710 
00711         
00712         // ===> Attribute antennaMake
00713         
00714         
00715 
00716         AntennaMakeMod::AntennaMake antennaMake;
00717 
00718         
00719         
00720         
00721 
00722         
00723         // ===> Attribute antennaType
00724         
00725         
00726 
00727         AntennaTypeMod::AntennaType antennaType;
00728 
00729         
00730         
00731         
00732 
00733         
00734         // ===> Attribute dishDiameter
00735         
00736         
00737 
00738         Length dishDiameter;
00739 
00740         
00741         
00742         
00743 
00744         
00745         // ===> Attribute position
00746         
00747         
00748 
00749         vector<Length > position;
00750 
00751         
00752         
00753         
00754 
00755         
00756         // ===> Attribute offset
00757         
00758         
00759 
00760         vector<Length > offset;
00761 
00762         
00763         
00764         
00765 
00766         
00767         // ===> Attribute time
00768         
00769         
00770 
00771         ArrayTime time;
00772 
00773         
00774         
00775         
00776 
00778         // Extrinsic Table Attributes //
00780         
00781         
00782         // ===> Attribute assocAntennaId, which is optional
00783         
00784         
00785         bool assocAntennaIdExists;
00786         
00787 
00788         Tag assocAntennaId;
00789 
00790         
00791         
00792         
00793 
00794         
00795         // ===> Attribute stationId
00796         
00797         
00798 
00799         Tag stationId;
00800 
00801         
00802         
00803         
00804 
00806         // Links //
00808         
00809                 
00810                 
00811         
00812 
00813         
00814                 
00815 
00816          
00817 
00818         
00819 
00820         
00821 /*
00823         // binary-deserialization material from an EndianIStream  //
00825         std::map<std::string, AntennaAttributeFromBin> fromBinMethods;
00826 void antennaIdFromBin( EndianIStream& eis);
00827 void nameFromBin( EndianIStream& eis);
00828 void antennaMakeFromBin( EndianIStream& eis);
00829 void antennaTypeFromBin( EndianIStream& eis);
00830 void dishDiameterFromBin( EndianIStream& eis);
00831 void positionFromBin( EndianIStream& eis);
00832 void offsetFromBin( EndianIStream& eis);
00833 void timeFromBin( EndianIStream& eis);
00834 void stationIdFromBin( EndianIStream& eis);
00835 
00836 void assocAntennaIdFromBin( EndianIStream& eis);
00837 
00838 */
00839         
00841         // text-deserialization material //
00843         std::map<std::string, AntennaAttributeFromText> fromTextMethods;
00844         
00845 void antennaIdFromText (const string & s);
00846         
00847         
00848 void nameFromText (const string & s);
00849         
00850         
00851 void antennaMakeFromText (const string & s);
00852         
00853         
00854 void antennaTypeFromText (const string & s);
00855         
00856         
00857 void dishDiameterFromText (const string & s);
00858         
00859         
00860 void positionFromText (const string & s);
00861         
00862         
00863 void offsetFromText (const string & s);
00864         
00865         
00866 void timeFromText (const string & s);
00867         
00868         
00869 void stationIdFromText (const string & s);
00870         
00871 
00872         
00873 void assocAntennaIdFromText (const string & s);
00874         
00875         
00876         
00881          void toBin(EndianOSStream& eoss);
00882                  
00892 };
00893 
00894 } // End namespace asdm
00895 
00896 #endif /* Antenna_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines