casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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.64", 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         
00576          void toIDL(asdmIDL::AntennaRowIDL& x) const;
00577 #endif
00578         
00579 #ifndef WITHOUT_ACS
00580 
00585         void setFromIDL (asdmIDL::AntennaRowIDL x) ;
00586 #endif
00587         
00592         std::string toXML() const;
00593 
00600         void setFromXML (std::string rowDoc) ;
00601 
00604         // binary-deserialization material from an EndianIStream  //
00606 
00607         std::map<std::string, AntennaAttributeFromBin> fromBinMethods;
00608 void antennaIdFromBin( EndianIStream& eis);
00609 void nameFromBin( EndianIStream& eis);
00610 void antennaMakeFromBin( EndianIStream& eis);
00611 void antennaTypeFromBin( EndianIStream& eis);
00612 void dishDiameterFromBin( EndianIStream& eis);
00613 void positionFromBin( EndianIStream& eis);
00614 void offsetFromBin( EndianIStream& eis);
00615 void timeFromBin( EndianIStream& eis);
00616 void stationIdFromBin( EndianIStream& eis);
00617 
00618 void assocAntennaIdFromBin( EndianIStream& eis);
00619 
00620 
00628          static AntennaRow* fromBin(EndianIStream& eis, AntennaTable& table, const std::vector<std::string>& attributesSeq);     
00629  
00636          void fromText(const std::string& attributeName, const std::string&  t);
00638 
00639 private:
00643         AntennaTable &table;
00647         bool hasBeenAdded;
00648 
00649         // This method is used by the Table class when this row is added to the table.
00650         void isAdded(bool added);
00651 
00652 
00661         AntennaRow (AntennaTable &table);
00662 
00680          AntennaRow (AntennaTable &table, AntennaRow &row);
00681                 
00683         // Intrinsic Table Attributes //
00685         
00686         
00687         // ===> Attribute antennaId
00688         
00689         
00690 
00691         Tag antennaId;
00692 
00693         
00694         
00695         
00705         void setAntennaId (Tag antennaId);
00706                 
00707         
00708 
00709         
00710         // ===> Attribute name
00711         
00712         
00713 
00714         string name;
00715 
00716         
00717         
00718         
00719 
00720         
00721         // ===> Attribute antennaMake
00722         
00723         
00724 
00725         AntennaMakeMod::AntennaMake antennaMake;
00726 
00727         
00728         
00729         
00730 
00731         
00732         // ===> Attribute antennaType
00733         
00734         
00735 
00736         AntennaTypeMod::AntennaType antennaType;
00737 
00738         
00739         
00740         
00741 
00742         
00743         // ===> Attribute dishDiameter
00744         
00745         
00746 
00747         Length dishDiameter;
00748 
00749         
00750         
00751         
00752 
00753         
00754         // ===> Attribute position
00755         
00756         
00757 
00758         vector<Length > position;
00759 
00760         
00761         
00762         
00763 
00764         
00765         // ===> Attribute offset
00766         
00767         
00768 
00769         vector<Length > offset;
00770 
00771         
00772         
00773         
00774 
00775         
00776         // ===> Attribute time
00777         
00778         
00779 
00780         ArrayTime time;
00781 
00782         
00783         
00784         
00785 
00787         // Extrinsic Table Attributes //
00789         
00790         
00791         // ===> Attribute assocAntennaId, which is optional
00792         
00793         
00794         bool assocAntennaIdExists;
00795         
00796 
00797         Tag assocAntennaId;
00798 
00799         
00800         
00801         
00802 
00803         
00804         // ===> Attribute stationId
00805         
00806         
00807 
00808         Tag stationId;
00809 
00810         
00811         
00812         
00813 
00815         // Links //
00817         
00818                 
00819                 
00820         
00821 
00822         
00823                 
00824 
00825          
00826 
00827         
00828 
00829         
00830 /*
00832         // binary-deserialization material from an EndianIStream  //
00834         std::map<std::string, AntennaAttributeFromBin> fromBinMethods;
00835 void antennaIdFromBin( EndianIStream& eis);
00836 void nameFromBin( EndianIStream& eis);
00837 void antennaMakeFromBin( EndianIStream& eis);
00838 void antennaTypeFromBin( EndianIStream& eis);
00839 void dishDiameterFromBin( EndianIStream& eis);
00840 void positionFromBin( EndianIStream& eis);
00841 void offsetFromBin( EndianIStream& eis);
00842 void timeFromBin( EndianIStream& eis);
00843 void stationIdFromBin( EndianIStream& eis);
00844 
00845 void assocAntennaIdFromBin( EndianIStream& eis);
00846 
00847 */
00848         
00850         // text-deserialization material //
00852         std::map<std::string, AntennaAttributeFromText> fromTextMethods;
00853         
00854 void antennaIdFromText (const string & s);
00855         
00856         
00857 void nameFromText (const string & s);
00858         
00859         
00860 void antennaMakeFromText (const string & s);
00861         
00862         
00863 void antennaTypeFromText (const string & s);
00864         
00865         
00866 void dishDiameterFromText (const string & s);
00867         
00868         
00869 void positionFromText (const string & s);
00870         
00871         
00872 void offsetFromText (const string & s);
00873         
00874         
00875 void timeFromText (const string & s);
00876         
00877         
00878 void stationIdFromText (const string & s);
00879         
00880 
00881         
00882 void assocAntennaIdFromText (const string & s);
00883         
00884         
00885         
00890          void toBin(EndianOSStream& eoss);
00891                  
00901 };
00902 
00903 } // End namespace asdm
00904 
00905 #endif /* Antenna_CLASS */