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 SubscanRow.h 00032 */ 00033 00034 #ifndef SubscanRow_CLASS 00035 #define SubscanRow_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 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 #include "CSubscanIntent.h" 00073 00074 00075 00076 #include "CSwitchingMode.h" 00077 00078 00079 00080 00081 00082 00083 00084 #include "CCorrelatorCalibration.h" 00085 00086 00087 00088 00089 #include <ConversionException.h> 00090 #include <NoSuchRow.h> 00091 #include <IllegalAccessException.h> 00092 00093 #include <RowTransformer.h> 00094 //#include <TableStreamReader.h> 00095 00096 /*\file Subscan.h 00097 \brief Generated from model's revision "1.61", branch "HEAD" 00098 */ 00099 00100 namespace asdm { 00101 00102 //class asdm::SubscanTable; 00103 00104 00105 // class asdm::ExecBlockRow; 00106 class ExecBlockRow; 00107 00108 00109 class SubscanRow; 00110 typedef void (SubscanRow::*SubscanAttributeFromBin) (EndianIStream& eis); 00111 typedef void (SubscanRow::*SubscanAttributeFromText) (const string& s); 00112 00119 class SubscanRow { 00120 friend class asdm::SubscanTable; 00121 friend class asdm::RowTransformer<SubscanRow>; 00122 //friend class asdm::TableStreamReader<SubscanTable, SubscanRow>; 00123 00124 public: 00125 00126 virtual ~SubscanRow(); 00127 00131 SubscanTable &getTable() const; 00132 00137 bool isAdded() const; 00138 00140 // Intrinsic Table Attributes // 00142 00143 00144 // ===> Attribute scanNumber 00145 00146 00147 00148 00149 00154 int getScanNumber() const; 00155 00156 00157 00158 00168 void setScanNumber (int scanNumber); 00169 00170 00171 00172 00173 00174 00175 00176 // ===> Attribute subscanNumber 00177 00178 00179 00180 00181 00186 int getSubscanNumber() const; 00187 00188 00189 00190 00200 void setSubscanNumber (int subscanNumber); 00201 00202 00203 00204 00205 00206 00207 00208 // ===> Attribute startTime 00209 00210 00211 00212 00213 00218 ArrayTime getStartTime() const; 00219 00220 00221 00222 00230 void setStartTime (ArrayTime startTime); 00231 00232 00233 00234 00235 00236 00237 00238 // ===> Attribute endTime 00239 00240 00241 00242 00243 00248 ArrayTime getEndTime() const; 00249 00250 00251 00252 00260 void setEndTime (ArrayTime endTime); 00261 00262 00263 00264 00265 00266 00267 00268 // ===> Attribute fieldName 00269 00270 00271 00272 00273 00278 string getFieldName() const; 00279 00280 00281 00282 00290 void setFieldName (string fieldName); 00291 00292 00293 00294 00295 00296 00297 00298 // ===> Attribute subscanIntent 00299 00300 00301 00302 00303 00308 SubscanIntentMod::SubscanIntent getSubscanIntent() const; 00309 00310 00311 00312 00320 void setSubscanIntent (SubscanIntentMod::SubscanIntent subscanIntent); 00321 00322 00323 00324 00325 00326 00327 00328 // ===> Attribute subscanMode, which is optional 00329 00330 00331 00336 bool isSubscanModeExists() const; 00337 00338 00339 00345 SwitchingModeMod::SwitchingMode getSubscanMode() const; 00346 00347 00348 00349 00356 void setSubscanMode (SwitchingModeMod::SwitchingMode subscanMode); 00357 00358 00359 00360 00364 void clearSubscanMode (); 00365 00366 00367 00368 00369 // ===> Attribute numIntegration 00370 00371 00372 00373 00374 00379 int getNumIntegration() const; 00380 00381 00382 00383 00391 void setNumIntegration (int numIntegration); 00392 00393 00394 00395 00396 00397 00398 00399 // ===> Attribute numSubintegration 00400 00401 00402 00403 00404 00409 vector<int > getNumSubintegration() const; 00410 00411 00412 00413 00421 void setNumSubintegration (vector<int > numSubintegration); 00422 00423 00424 00425 00426 00427 00428 00429 // ===> Attribute correlatorCalibration, which is optional 00430 00431 00432 00437 bool isCorrelatorCalibrationExists() const; 00438 00439 00440 00446 CorrelatorCalibrationMod::CorrelatorCalibration getCorrelatorCalibration() const; 00447 00448 00449 00450 00457 void setCorrelatorCalibration (CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration); 00458 00459 00460 00461 00465 void clearCorrelatorCalibration (); 00466 00467 00468 00470 // Extrinsic Table Attributes // 00472 00473 00474 // ===> Attribute execBlockId 00475 00476 00477 00478 00479 00484 Tag getExecBlockId() const; 00485 00486 00487 00488 00498 void setExecBlockId (Tag execBlockId); 00499 00500 00501 00502 00503 00504 00506 // Links // 00508 00509 00510 00511 00512 00519 ExecBlockRow* getExecBlockUsingExecBlockId(); 00520 00521 00522 00523 00524 00525 00526 00550 bool compareNoAutoInc(Tag execBlockId, int scanNumber, int subscanNumber, ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, vector<int > numSubintegration); 00551 00552 00553 00554 00572 bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, string fieldName, SubscanIntentMod::SubscanIntent subscanIntent, int numIntegration, vector<int > numSubintegration); 00573 00574 00583 bool equalByRequiredValue(SubscanRow* x) ; 00584 00585 #ifndef WITHOUT_ACS 00586 00590 asdmIDL::SubscanRowIDL *toIDL() const; 00591 #endif 00592 00593 #ifndef WITHOUT_ACS 00594 00599 void setFromIDL (asdmIDL::SubscanRowIDL x) ; 00600 #endif 00601 00606 std::string toXML() const; 00607 00614 void setFromXML (std::string rowDoc) ; 00615 00618 // binary-deserialization material from an EndianIStream // 00620 00621 std::map<std::string, SubscanAttributeFromBin> fromBinMethods; 00622 void execBlockIdFromBin( EndianIStream& eis); 00623 void scanNumberFromBin( EndianIStream& eis); 00624 void subscanNumberFromBin( EndianIStream& eis); 00625 void startTimeFromBin( EndianIStream& eis); 00626 void endTimeFromBin( EndianIStream& eis); 00627 void fieldNameFromBin( EndianIStream& eis); 00628 void subscanIntentFromBin( EndianIStream& eis); 00629 void numIntegrationFromBin( EndianIStream& eis); 00630 void numSubintegrationFromBin( EndianIStream& eis); 00631 00632 void subscanModeFromBin( EndianIStream& eis); 00633 void correlatorCalibrationFromBin( EndianIStream& eis); 00634 00635 00643 static SubscanRow* fromBin(EndianIStream& eis, SubscanTable& table, const std::vector<std::string>& attributesSeq); 00645 00646 private: 00650 SubscanTable &table; 00654 bool hasBeenAdded; 00655 00656 // This method is used by the Table class when this row is added to the table. 00657 void isAdded(bool added); 00658 00659 00668 SubscanRow (SubscanTable &table); 00669 00687 SubscanRow (SubscanTable &table, SubscanRow &row); 00688 00690 // Intrinsic Table Attributes // 00692 00693 00694 // ===> Attribute scanNumber 00695 00696 00697 00698 int scanNumber; 00699 00700 00701 00702 00703 00704 00705 // ===> Attribute subscanNumber 00706 00707 00708 00709 int subscanNumber; 00710 00711 00712 00713 00714 00715 00716 // ===> Attribute startTime 00717 00718 00719 00720 ArrayTime startTime; 00721 00722 00723 00724 00725 00726 00727 // ===> Attribute endTime 00728 00729 00730 00731 ArrayTime endTime; 00732 00733 00734 00735 00736 00737 00738 // ===> Attribute fieldName 00739 00740 00741 00742 string fieldName; 00743 00744 00745 00746 00747 00748 00749 // ===> Attribute subscanIntent 00750 00751 00752 00753 SubscanIntentMod::SubscanIntent subscanIntent; 00754 00755 00756 00757 00758 00759 00760 // ===> Attribute subscanMode, which is optional 00761 00762 00763 bool subscanModeExists; 00764 00765 00766 SwitchingModeMod::SwitchingMode subscanMode; 00767 00768 00769 00770 00771 00772 00773 // ===> Attribute numIntegration 00774 00775 00776 00777 int numIntegration; 00778 00779 00780 00781 00782 00783 00784 // ===> Attribute numSubintegration 00785 00786 00787 00788 vector<int > numSubintegration; 00789 00790 00791 00792 00793 00794 00795 // ===> Attribute correlatorCalibration, which is optional 00796 00797 00798 bool correlatorCalibrationExists; 00799 00800 00801 CorrelatorCalibrationMod::CorrelatorCalibration correlatorCalibration; 00802 00803 00804 00805 00806 00808 // Extrinsic Table Attributes // 00810 00811 00812 // ===> Attribute execBlockId 00813 00814 00815 00816 Tag execBlockId; 00817 00818 00819 00820 00821 00823 // Links // 00825 00826 00827 00828 00829 00830 00831 00832 00833 00834 /* 00836 // binary-deserialization material from an EndianIStream // 00838 std::map<std::string, SubscanAttributeFromBin> fromBinMethods; 00839 void execBlockIdFromBin( EndianIStream& eis); 00840 void scanNumberFromBin( EndianIStream& eis); 00841 void subscanNumberFromBin( EndianIStream& eis); 00842 void startTimeFromBin( EndianIStream& eis); 00843 void endTimeFromBin( EndianIStream& eis); 00844 void fieldNameFromBin( EndianIStream& eis); 00845 void subscanIntentFromBin( EndianIStream& eis); 00846 void numIntegrationFromBin( EndianIStream& eis); 00847 void numSubintegrationFromBin( EndianIStream& eis); 00848 00849 void subscanModeFromBin( EndianIStream& eis); 00850 void correlatorCalibrationFromBin( EndianIStream& eis); 00851 00852 */ 00853 00855 // text-deserialization material // 00857 std::map<std::string, SubscanAttributeFromText> fromTextMethods; 00858 00859 void execBlockIdFromText (const string & s); 00860 00861 00862 void scanNumberFromText (const string & s); 00863 00864 00865 void subscanNumberFromText (const string & s); 00866 00867 00868 void startTimeFromText (const string & s); 00869 00870 00871 void endTimeFromText (const string & s); 00872 00873 00874 void fieldNameFromText (const string & s); 00875 00876 00877 void subscanIntentFromText (const string & s); 00878 00879 00880 void numIntegrationFromText (const string & s); 00881 00882 00883 void numSubintegrationFromText (const string & s); 00884 00885 00886 00887 void subscanModeFromText (const string & s); 00888 00889 00890 void correlatorCalibrationFromText (const string & s); 00891 00892 00893 00894 void fromText(const std::string& attributeName, const std::string& t); 00895 00900 void toBin(EndianOSStream& eoss); 00901 00911 }; 00912 00913 } // End namespace asdm 00914 00915 #endif /* Subscan_CLASS */