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 CalDeviceRow.h 00032 */ 00033 00034 #ifndef CalDeviceRow_CLASS 00035 #define CalDeviceRow_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 <Temperature.h> 00056 00057 00058 00059 #include <ArrayTimeInterval.h> 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 #include "CCalibrationDevice.h" 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 #include <ConversionException.h> 00086 #include <NoSuchRow.h> 00087 #include <IllegalAccessException.h> 00088 00089 #include <RowTransformer.h> 00090 //#include <TableStreamReader.h> 00091 00092 /*\file CalDevice.h 00093 \brief Generated from model's revision "1.64", branch "HEAD" 00094 */ 00095 00096 namespace asdm { 00097 00098 //class asdm::CalDeviceTable; 00099 00100 00101 // class asdm::AntennaRow; 00102 class AntennaRow; 00103 00104 // class asdm::SpectralWindowRow; 00105 class SpectralWindowRow; 00106 00107 // class asdm::FeedRow; 00108 class FeedRow; 00109 00110 00111 class CalDeviceRow; 00112 typedef void (CalDeviceRow::*CalDeviceAttributeFromBin) (EndianIStream& eis); 00113 typedef void (CalDeviceRow::*CalDeviceAttributeFromText) (const string& s); 00114 00121 class CalDeviceRow { 00122 friend class asdm::CalDeviceTable; 00123 friend class asdm::RowTransformer<CalDeviceRow>; 00124 //friend class asdm::TableStreamReader<CalDeviceTable, CalDeviceRow>; 00125 00126 public: 00127 00128 virtual ~CalDeviceRow(); 00129 00133 CalDeviceTable &getTable() const; 00134 00139 bool isAdded() const; 00140 00142 // Intrinsic Table Attributes // 00144 00145 00146 // ===> Attribute timeInterval 00147 00148 00149 00150 00151 00156 ArrayTimeInterval getTimeInterval() const; 00157 00158 00159 00160 00170 void setTimeInterval (ArrayTimeInterval timeInterval); 00171 00172 00173 00174 00175 00176 00177 00178 // ===> Attribute numCalload 00179 00180 00181 00182 00183 00188 int getNumCalload() const; 00189 00190 00191 00192 00200 void setNumCalload (int numCalload); 00201 00202 00203 00204 00205 00206 00207 00208 // ===> Attribute calLoadNames 00209 00210 00211 00212 00213 00218 vector<CalibrationDeviceMod::CalibrationDevice > getCalLoadNames() const; 00219 00220 00221 00222 00230 void setCalLoadNames (vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames); 00231 00232 00233 00234 00235 00236 00237 00238 // ===> Attribute numReceptor, which is optional 00239 00240 00241 00246 bool isNumReceptorExists() const; 00247 00248 00249 00255 int getNumReceptor() const; 00256 00257 00258 00259 00266 void setNumReceptor (int numReceptor); 00267 00268 00269 00270 00274 void clearNumReceptor (); 00275 00276 00277 00278 00279 // ===> Attribute calEff, which is optional 00280 00281 00282 00287 bool isCalEffExists() const; 00288 00289 00290 00296 vector<vector<float > > getCalEff() const; 00297 00298 00299 00300 00307 void setCalEff (vector<vector<float > > calEff); 00308 00309 00310 00311 00315 void clearCalEff (); 00316 00317 00318 00319 00320 // ===> Attribute noiseCal, which is optional 00321 00322 00323 00328 bool isNoiseCalExists() const; 00329 00330 00331 00337 vector<double > getNoiseCal() const; 00338 00339 00340 00341 00348 void setNoiseCal (vector<double > noiseCal); 00349 00350 00351 00352 00356 void clearNoiseCal (); 00357 00358 00359 00360 00361 // ===> Attribute coupledNoiseCal, which is optional 00362 00363 00364 00369 bool isCoupledNoiseCalExists() const; 00370 00371 00372 00378 vector<vector<float > > getCoupledNoiseCal() const; 00379 00380 00381 00382 00389 void setCoupledNoiseCal (vector<vector<float > > coupledNoiseCal); 00390 00391 00392 00393 00397 void clearCoupledNoiseCal (); 00398 00399 00400 00401 00402 // ===> Attribute temperatureLoad, which is optional 00403 00404 00405 00410 bool isTemperatureLoadExists() const; 00411 00412 00413 00419 vector<Temperature > getTemperatureLoad() const; 00420 00421 00422 00423 00430 void setTemperatureLoad (vector<Temperature > temperatureLoad); 00431 00432 00433 00434 00438 void clearTemperatureLoad (); 00439 00440 00441 00443 // Extrinsic Table Attributes // 00445 00446 00447 // ===> Attribute antennaId 00448 00449 00450 00451 00452 00457 Tag getAntennaId() const; 00458 00459 00460 00461 00471 void setAntennaId (Tag antennaId); 00472 00473 00474 00475 00476 00477 00478 00479 // ===> Attribute feedId 00480 00481 00482 00483 00484 00489 int getFeedId() const; 00490 00491 00492 00493 00503 void setFeedId (int feedId); 00504 00505 00506 00507 00508 00509 00510 00511 // ===> Attribute spectralWindowId 00512 00513 00514 00515 00516 00521 Tag getSpectralWindowId() const; 00522 00523 00524 00525 00535 void setSpectralWindowId (Tag spectralWindowId); 00536 00537 00538 00539 00540 00541 00543 // Links // 00545 00546 00547 00548 00549 00556 AntennaRow* getAntennaUsingAntennaId(); 00557 00558 00559 00560 00561 00562 00563 00564 00571 SpectralWindowRow* getSpectralWindowUsingSpectralWindowId(); 00572 00573 00574 00575 00576 00577 00578 00579 00580 // ===> Slice link from a row of CalDevice table to a collection of row of Feed table. 00581 00587 vector <FeedRow *> getFeeds(); 00588 00589 00590 00591 00592 00593 00594 00595 00613 bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numCalload, vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames); 00614 00615 00616 00617 00627 bool compareRequiredValue(int numCalload, vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames); 00628 00629 00638 bool equalByRequiredValue(CalDeviceRow* x) ; 00639 00640 #ifndef WITHOUT_ACS 00641 00645 asdmIDL::CalDeviceRowIDL *toIDL() const; 00646 00654 void toIDL(asdmIDL::CalDeviceRowIDL& x) const; 00655 #endif 00656 00657 #ifndef WITHOUT_ACS 00658 00663 void setFromIDL (asdmIDL::CalDeviceRowIDL x) ; 00664 #endif 00665 00670 std::string toXML() const; 00671 00678 void setFromXML (std::string rowDoc) ; 00679 00682 // binary-deserialization material from an EndianIStream // 00684 00685 std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods; 00686 void antennaIdFromBin( EndianIStream& eis); 00687 void spectralWindowIdFromBin( EndianIStream& eis); 00688 void timeIntervalFromBin( EndianIStream& eis); 00689 void feedIdFromBin( EndianIStream& eis); 00690 void numCalloadFromBin( EndianIStream& eis); 00691 void calLoadNamesFromBin( EndianIStream& eis); 00692 00693 void numReceptorFromBin( EndianIStream& eis); 00694 void calEffFromBin( EndianIStream& eis); 00695 void noiseCalFromBin( EndianIStream& eis); 00696 void coupledNoiseCalFromBin( EndianIStream& eis); 00697 void temperatureLoadFromBin( EndianIStream& eis); 00698 00699 00707 static CalDeviceRow* fromBin(EndianIStream& eis, CalDeviceTable& table, const std::vector<std::string>& attributesSeq); 00708 00715 void fromText(const std::string& attributeName, const std::string& t); 00717 00718 private: 00722 CalDeviceTable &table; 00726 bool hasBeenAdded; 00727 00728 // This method is used by the Table class when this row is added to the table. 00729 void isAdded(bool added); 00730 00731 00740 CalDeviceRow (CalDeviceTable &table); 00741 00759 CalDeviceRow (CalDeviceTable &table, CalDeviceRow &row); 00760 00762 // Intrinsic Table Attributes // 00764 00765 00766 // ===> Attribute timeInterval 00767 00768 00769 00770 ArrayTimeInterval timeInterval; 00771 00772 00773 00774 00775 00776 00777 // ===> Attribute numCalload 00778 00779 00780 00781 int numCalload; 00782 00783 00784 00785 00786 00787 00788 // ===> Attribute calLoadNames 00789 00790 00791 00792 vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames; 00793 00794 00795 00796 00797 00798 00799 // ===> Attribute numReceptor, which is optional 00800 00801 00802 bool numReceptorExists; 00803 00804 00805 int numReceptor; 00806 00807 00808 00809 00810 00811 00812 // ===> Attribute calEff, which is optional 00813 00814 00815 bool calEffExists; 00816 00817 00818 vector<vector<float > > calEff; 00819 00820 00821 00822 00823 00824 00825 // ===> Attribute noiseCal, which is optional 00826 00827 00828 bool noiseCalExists; 00829 00830 00831 vector<double > noiseCal; 00832 00833 00834 00835 00836 00837 00838 // ===> Attribute coupledNoiseCal, which is optional 00839 00840 00841 bool coupledNoiseCalExists; 00842 00843 00844 vector<vector<float > > coupledNoiseCal; 00845 00846 00847 00848 00849 00850 00851 // ===> Attribute temperatureLoad, which is optional 00852 00853 00854 bool temperatureLoadExists; 00855 00856 00857 vector<Temperature > temperatureLoad; 00858 00859 00860 00861 00862 00864 // Extrinsic Table Attributes // 00866 00867 00868 // ===> Attribute antennaId 00869 00870 00871 00872 Tag antennaId; 00873 00874 00875 00876 00877 00878 00879 // ===> Attribute feedId 00880 00881 00882 00883 int feedId; 00884 00885 00886 00887 00888 00889 00890 // ===> Attribute spectralWindowId 00891 00892 00893 00894 Tag spectralWindowId; 00895 00896 00897 00898 00899 00901 // Links // 00903 00904 00905 00906 00907 00908 00909 00910 00911 00912 00913 00914 00915 00916 00917 00918 00919 00920 00921 00922 00923 00924 00925 /* 00927 // binary-deserialization material from an EndianIStream // 00929 std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods; 00930 void antennaIdFromBin( EndianIStream& eis); 00931 void spectralWindowIdFromBin( EndianIStream& eis); 00932 void timeIntervalFromBin( EndianIStream& eis); 00933 void feedIdFromBin( EndianIStream& eis); 00934 void numCalloadFromBin( EndianIStream& eis); 00935 void calLoadNamesFromBin( EndianIStream& eis); 00936 00937 void numReceptorFromBin( EndianIStream& eis); 00938 void calEffFromBin( EndianIStream& eis); 00939 void noiseCalFromBin( EndianIStream& eis); 00940 void coupledNoiseCalFromBin( EndianIStream& eis); 00941 void temperatureLoadFromBin( EndianIStream& eis); 00942 00943 */ 00944 00946 // text-deserialization material // 00948 std::map<std::string, CalDeviceAttributeFromText> fromTextMethods; 00949 00950 void antennaIdFromText (const string & s); 00951 00952 00953 void spectralWindowIdFromText (const string & s); 00954 00955 00956 void timeIntervalFromText (const string & s); 00957 00958 00959 void feedIdFromText (const string & s); 00960 00961 00962 void numCalloadFromText (const string & s); 00963 00964 00965 void calLoadNamesFromText (const string & s); 00966 00967 00968 00969 void numReceptorFromText (const string & s); 00970 00971 00972 void calEffFromText (const string & s); 00973 00974 00975 void noiseCalFromText (const string & s); 00976 00977 00978 void coupledNoiseCalFromText (const string & s); 00979 00980 00981 void temperatureLoadFromText (const string & s); 00982 00983 00984 00989 void toBin(EndianOSStream& eoss); 00990 01000 }; 01001 01002 } // End namespace asdm 01003 01004 #endif /* CalDevice_CLASS */