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.64", 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 00469 void toIDL(asdmIDL::SwitchCycleRowIDL& x) const; 00470 #endif 00471 00472 #ifndef WITHOUT_ACS 00473 00478 void setFromIDL (asdmIDL::SwitchCycleRowIDL x) ; 00479 #endif 00480 00485 std::string toXML() const; 00486 00493 void setFromXML (std::string rowDoc) ; 00494 00497 // binary-deserialization material from an EndianIStream // 00499 00500 std::map<std::string, SwitchCycleAttributeFromBin> fromBinMethods; 00501 void switchCycleIdFromBin( EndianIStream& eis); 00502 void numStepFromBin( EndianIStream& eis); 00503 void weightArrayFromBin( EndianIStream& eis); 00504 void dirOffsetArrayFromBin( EndianIStream& eis); 00505 void freqOffsetArrayFromBin( EndianIStream& eis); 00506 void stepDurationArrayFromBin( EndianIStream& eis); 00507 00508 void directionCodeFromBin( EndianIStream& eis); 00509 void directionEquinoxFromBin( EndianIStream& eis); 00510 00511 00519 static SwitchCycleRow* fromBin(EndianIStream& eis, SwitchCycleTable& table, const std::vector<std::string>& attributesSeq); 00520 00527 void fromText(const std::string& attributeName, const std::string& t); 00529 00530 private: 00534 SwitchCycleTable &table; 00538 bool hasBeenAdded; 00539 00540 // This method is used by the Table class when this row is added to the table. 00541 void isAdded(bool added); 00542 00543 00552 SwitchCycleRow (SwitchCycleTable &table); 00553 00571 SwitchCycleRow (SwitchCycleTable &table, SwitchCycleRow &row); 00572 00574 // Intrinsic Table Attributes // 00576 00577 00578 // ===> Attribute switchCycleId 00579 00580 00581 00582 Tag switchCycleId; 00583 00584 00585 00586 00596 void setSwitchCycleId (Tag switchCycleId); 00597 00598 00599 00600 00601 // ===> Attribute numStep 00602 00603 00604 00605 int numStep; 00606 00607 00608 00609 00610 00611 00612 // ===> Attribute weightArray 00613 00614 00615 00616 vector<float > weightArray; 00617 00618 00619 00620 00621 00622 00623 // ===> Attribute dirOffsetArray 00624 00625 00626 00627 vector<vector<Angle > > dirOffsetArray; 00628 00629 00630 00631 00632 00633 00634 // ===> Attribute freqOffsetArray 00635 00636 00637 00638 vector<Frequency > freqOffsetArray; 00639 00640 00641 00642 00643 00644 00645 // ===> Attribute stepDurationArray 00646 00647 00648 00649 vector<Interval > stepDurationArray; 00650 00651 00652 00653 00654 00655 00656 // ===> Attribute directionCode, which is optional 00657 00658 00659 bool directionCodeExists; 00660 00661 00662 DirectionReferenceCodeMod::DirectionReferenceCode directionCode; 00663 00664 00665 00666 00667 00668 00669 // ===> Attribute directionEquinox, which is optional 00670 00671 00672 bool directionEquinoxExists; 00673 00674 00675 ArrayTime directionEquinox; 00676 00677 00678 00679 00680 00682 // Extrinsic Table Attributes // 00684 00686 // Links // 00688 00689 00690 /* 00692 // binary-deserialization material from an EndianIStream // 00694 std::map<std::string, SwitchCycleAttributeFromBin> fromBinMethods; 00695 void switchCycleIdFromBin( EndianIStream& eis); 00696 void numStepFromBin( EndianIStream& eis); 00697 void weightArrayFromBin( EndianIStream& eis); 00698 void dirOffsetArrayFromBin( EndianIStream& eis); 00699 void freqOffsetArrayFromBin( EndianIStream& eis); 00700 void stepDurationArrayFromBin( EndianIStream& eis); 00701 00702 void directionCodeFromBin( EndianIStream& eis); 00703 void directionEquinoxFromBin( EndianIStream& eis); 00704 00705 */ 00706 00708 // text-deserialization material // 00710 std::map<std::string, SwitchCycleAttributeFromText> fromTextMethods; 00711 00712 void switchCycleIdFromText (const string & s); 00713 00714 00715 void numStepFromText (const string & s); 00716 00717 00718 void weightArrayFromText (const string & s); 00719 00720 00721 void dirOffsetArrayFromText (const string & s); 00722 00723 00724 void freqOffsetArrayFromText (const string & s); 00725 00726 00727 void stepDurationArrayFromText (const string & s); 00728 00729 00730 00731 void directionCodeFromText (const string & s); 00732 00733 00734 void directionEquinoxFromText (const string & s); 00735 00736 00737 00742 void toBin(EndianOSStream& eoss); 00743 00753 }; 00754 00755 } // End namespace asdm 00756 00757 #endif /* SwitchCycle_CLASS */