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 SwitchCycleRow.h 00032 */ 00033 00034 #ifndef SwitchCycleRow_CLASS 00035 #define SwitchCycleRow_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 <Angle.h> 00056 00057 00058 00059 #include <Interval.h> 00060 00061 00062 00063 #include <Tag.h> 00064 00065 00066 00067 #include <Frequency.h> 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 #include "CDirectionReferenceCode.h" 00087 00088 00089 00090 00091 00092 00093 #include <ConversionException.h> 00094 #include <NoSuchRow.h> 00095 #include <IllegalAccessException.h> 00096 00097 #include <RowTransformer.h> 00098 //#include <TableStreamReader.h> 00099 00100 /*\file SwitchCycle.h 00101 \brief Generated from model's revision "1.62", branch "HEAD" 00102 */ 00103 00104 namespace asdm { 00105 00106 //class asdm::SwitchCycleTable; 00107 00108 00109 00110 class SwitchCycleRow; 00111 typedef void (SwitchCycleRow::*SwitchCycleAttributeFromBin) (EndianIStream& eis); 00112 typedef void (SwitchCycleRow::*SwitchCycleAttributeFromText) (const string& s); 00113 00120 class SwitchCycleRow { 00121 friend class asdm::SwitchCycleTable; 00122 friend class asdm::RowTransformer<SwitchCycleRow>; 00123 //friend class asdm::TableStreamReader<SwitchCycleTable, SwitchCycleRow>; 00124 00125 public: 00126 00127 virtual ~SwitchCycleRow(); 00128 00132 SwitchCycleTable &getTable() const; 00133 00138 bool isAdded() const; 00139 00141 // Intrinsic Table Attributes // 00143 00144 00145 // ===> Attribute switchCycleId 00146 00147 00148 00149 00150 00155 Tag getSwitchCycleId() const; 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 // ===> Attribute numStep 00166 00167 00168 00169 00170 00175 int getNumStep() const; 00176 00177 00178 00179 00187 void setNumStep (int numStep); 00188 00189 00190 00191 00192 00193 00194 00195 // ===> Attribute weightArray 00196 00197 00198 00199 00200 00205 vector<float > getWeightArray() const; 00206 00207 00208 00209 00217 void setWeightArray (vector<float > weightArray); 00218 00219 00220 00221 00222 00223 00224 00225 // ===> Attribute dirOffsetArray 00226 00227 00228 00229 00230 00235 vector<vector<Angle > > getDirOffsetArray() const; 00236 00237 00238 00239 00247 void setDirOffsetArray (vector<vector<Angle > > dirOffsetArray); 00248 00249 00250 00251 00252 00253 00254 00255 // ===> Attribute freqOffsetArray 00256 00257 00258 00259 00260 00265 vector<Frequency > getFreqOffsetArray() const; 00266 00267 00268 00269 00277 void setFreqOffsetArray (vector<Frequency > freqOffsetArray); 00278 00279 00280 00281 00282 00283 00284 00285 // ===> Attribute stepDurationArray 00286 00287 00288 00289 00290 00295 vector<Interval > getStepDurationArray() const; 00296 00297 00298 00299 00307 void setStepDurationArray (vector<Interval > stepDurationArray); 00308 00309 00310 00311 00312 00313 00314 00315 // ===> Attribute directionCode, which is optional 00316 00317 00318 00323 bool isDirectionCodeExists() const; 00324 00325 00326 00332 DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const; 00333 00334 00335 00336 00343 void setDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode directionCode); 00344 00345 00346 00347 00351 void clearDirectionCode (); 00352 00353 00354 00355 00356 // ===> Attribute directionEquinox, which is optional 00357 00358 00359 00364 bool isDirectionEquinoxExists() const; 00365 00366 00367 00373 ArrayTime getDirectionEquinox() const; 00374 00375 00376 00377 00384 void setDirectionEquinox (ArrayTime directionEquinox); 00385 00386 00387 00388 00392 void clearDirectionEquinox (); 00393 00394 00395 00397 // Extrinsic Table Attributes // 00399 00401 // Links // 00403 00404 00405 00406 00422 bool compareNoAutoInc(int numStep, vector<float > weightArray, vector<vector<Angle > > dirOffsetArray, vector<Frequency > freqOffsetArray, vector<Interval > stepDurationArray); 00423 00424 00425 00426 00442 bool compareRequiredValue(int numStep, vector<float > weightArray, vector<vector<Angle > > dirOffsetArray, vector<Frequency > freqOffsetArray, vector<Interval > stepDurationArray); 00443 00444 00453 bool equalByRequiredValue(SwitchCycleRow* x) ; 00454 00455 #ifndef WITHOUT_ACS 00456 00460 asdmIDL::SwitchCycleRowIDL *toIDL() const; 00461 #endif 00462 00463 #ifndef WITHOUT_ACS 00464 00469 void setFromIDL (asdmIDL::SwitchCycleRowIDL x) ; 00470 #endif 00471 00476 std::string toXML() const; 00477 00484 void setFromXML (std::string rowDoc) ; 00485 00488 // binary-deserialization material from an EndianIStream // 00490 00491 std::map<std::string, SwitchCycleAttributeFromBin> fromBinMethods; 00492 void switchCycleIdFromBin( EndianIStream& eis); 00493 void numStepFromBin( EndianIStream& eis); 00494 void weightArrayFromBin( EndianIStream& eis); 00495 void dirOffsetArrayFromBin( EndianIStream& eis); 00496 void freqOffsetArrayFromBin( EndianIStream& eis); 00497 void stepDurationArrayFromBin( EndianIStream& eis); 00498 00499 void directionCodeFromBin( EndianIStream& eis); 00500 void directionEquinoxFromBin( EndianIStream& eis); 00501 00502 00510 static SwitchCycleRow* fromBin(EndianIStream& eis, SwitchCycleTable& table, const std::vector<std::string>& attributesSeq); 00511 00518 void fromText(const std::string& attributeName, const std::string& t); 00520 00521 private: 00525 SwitchCycleTable &table; 00529 bool hasBeenAdded; 00530 00531 // This method is used by the Table class when this row is added to the table. 00532 void isAdded(bool added); 00533 00534 00543 SwitchCycleRow (SwitchCycleTable &table); 00544 00562 SwitchCycleRow (SwitchCycleTable &table, SwitchCycleRow &row); 00563 00565 // Intrinsic Table Attributes // 00567 00568 00569 // ===> Attribute switchCycleId 00570 00571 00572 00573 Tag switchCycleId; 00574 00575 00576 00577 00587 void setSwitchCycleId (Tag switchCycleId); 00588 00589 00590 00591 00592 // ===> Attribute numStep 00593 00594 00595 00596 int numStep; 00597 00598 00599 00600 00601 00602 00603 // ===> Attribute weightArray 00604 00605 00606 00607 vector<float > weightArray; 00608 00609 00610 00611 00612 00613 00614 // ===> Attribute dirOffsetArray 00615 00616 00617 00618 vector<vector<Angle > > dirOffsetArray; 00619 00620 00621 00622 00623 00624 00625 // ===> Attribute freqOffsetArray 00626 00627 00628 00629 vector<Frequency > freqOffsetArray; 00630 00631 00632 00633 00634 00635 00636 // ===> Attribute stepDurationArray 00637 00638 00639 00640 vector<Interval > stepDurationArray; 00641 00642 00643 00644 00645 00646 00647 // ===> Attribute directionCode, which is optional 00648 00649 00650 bool directionCodeExists; 00651 00652 00653 DirectionReferenceCodeMod::DirectionReferenceCode directionCode; 00654 00655 00656 00657 00658 00659 00660 // ===> Attribute directionEquinox, which is optional 00661 00662 00663 bool directionEquinoxExists; 00664 00665 00666 ArrayTime directionEquinox; 00667 00668 00669 00670 00671 00673 // Extrinsic Table Attributes // 00675 00677 // Links // 00679 00680 00681 /* 00683 // binary-deserialization material from an EndianIStream // 00685 std::map<std::string, SwitchCycleAttributeFromBin> fromBinMethods; 00686 void switchCycleIdFromBin( EndianIStream& eis); 00687 void numStepFromBin( EndianIStream& eis); 00688 void weightArrayFromBin( EndianIStream& eis); 00689 void dirOffsetArrayFromBin( EndianIStream& eis); 00690 void freqOffsetArrayFromBin( EndianIStream& eis); 00691 void stepDurationArrayFromBin( EndianIStream& eis); 00692 00693 void directionCodeFromBin( EndianIStream& eis); 00694 void directionEquinoxFromBin( EndianIStream& eis); 00695 00696 */ 00697 00699 // text-deserialization material // 00701 std::map<std::string, SwitchCycleAttributeFromText> fromTextMethods; 00702 00703 void switchCycleIdFromText (const string & s); 00704 00705 00706 void numStepFromText (const string & s); 00707 00708 00709 void weightArrayFromText (const string & s); 00710 00711 00712 void dirOffsetArrayFromText (const string & s); 00713 00714 00715 void freqOffsetArrayFromText (const string & s); 00716 00717 00718 void stepDurationArrayFromText (const string & s); 00719 00720 00721 00722 void directionCodeFromText (const string & s); 00723 00724 00725 void directionEquinoxFromText (const string & s); 00726 00727 00728 00733 void toBin(EndianOSStream& eoss); 00734 00744 }; 00745 00746 } // End namespace asdm 00747 00748 #endif /* SwitchCycle_CLASS */