casa
$Rev:20696$
|
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.61", 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); 00621 00622 private: 00626 AntennaTable &table; 00630 bool hasBeenAdded; 00631 00632 // This method is used by the Table class when this row is added to the table. 00633 void isAdded(bool added); 00634 00635 00644 AntennaRow (AntennaTable &table); 00645 00663 AntennaRow (AntennaTable &table, AntennaRow &row); 00664 00666 // Intrinsic Table Attributes // 00668 00669 00670 // ===> Attribute antennaId 00671 00672 00673 00674 Tag antennaId; 00675 00676 00677 00678 00688 void setAntennaId (Tag antennaId); 00689 00690 00691 00692 00693 // ===> Attribute name 00694 00695 00696 00697 string name; 00698 00699 00700 00701 00702 00703 00704 // ===> Attribute antennaMake 00705 00706 00707 00708 AntennaMakeMod::AntennaMake antennaMake; 00709 00710 00711 00712 00713 00714 00715 // ===> Attribute antennaType 00716 00717 00718 00719 AntennaTypeMod::AntennaType antennaType; 00720 00721 00722 00723 00724 00725 00726 // ===> Attribute dishDiameter 00727 00728 00729 00730 Length dishDiameter; 00731 00732 00733 00734 00735 00736 00737 // ===> Attribute position 00738 00739 00740 00741 vector<Length > position; 00742 00743 00744 00745 00746 00747 00748 // ===> Attribute offset 00749 00750 00751 00752 vector<Length > offset; 00753 00754 00755 00756 00757 00758 00759 // ===> Attribute time 00760 00761 00762 00763 ArrayTime time; 00764 00765 00766 00767 00768 00770 // Extrinsic Table Attributes // 00772 00773 00774 // ===> Attribute assocAntennaId, which is optional 00775 00776 00777 bool assocAntennaIdExists; 00778 00779 00780 Tag assocAntennaId; 00781 00782 00783 00784 00785 00786 00787 // ===> Attribute stationId 00788 00789 00790 00791 Tag stationId; 00792 00793 00794 00795 00796 00798 // Links // 00800 00801 00802 00803 00804 00805 00806 00807 00808 00809 00810 00811 00812 00813 /* 00815 // binary-deserialization material from an EndianIStream // 00817 std::map<std::string, AntennaAttributeFromBin> fromBinMethods; 00818 void antennaIdFromBin( EndianIStream& eis); 00819 void nameFromBin( EndianIStream& eis); 00820 void antennaMakeFromBin( EndianIStream& eis); 00821 void antennaTypeFromBin( EndianIStream& eis); 00822 void dishDiameterFromBin( EndianIStream& eis); 00823 void positionFromBin( EndianIStream& eis); 00824 void offsetFromBin( EndianIStream& eis); 00825 void timeFromBin( EndianIStream& eis); 00826 void stationIdFromBin( EndianIStream& eis); 00827 00828 void assocAntennaIdFromBin( EndianIStream& eis); 00829 00830 */ 00831 00833 // text-deserialization material // 00835 std::map<std::string, AntennaAttributeFromText> fromTextMethods; 00836 00837 void antennaIdFromText (const string & s); 00838 00839 00840 void nameFromText (const string & s); 00841 00842 00843 void antennaMakeFromText (const string & s); 00844 00845 00846 void antennaTypeFromText (const string & s); 00847 00848 00849 void dishDiameterFromText (const string & s); 00850 00851 00852 void positionFromText (const string & s); 00853 00854 00855 void offsetFromText (const string & s); 00856 00857 00858 void timeFromText (const string & s); 00859 00860 00861 void stationIdFromText (const string & s); 00862 00863 00864 00865 void assocAntennaIdFromText (const string & s); 00866 00867 00868 00869 void fromText(const std::string& attributeName, const std::string& t); 00870 00875 void toBin(EndianOSStream& eoss); 00876 00886 }; 00887 00888 } // End namespace asdm 00889 00890 #endif /* Antenna_CLASS */