SwitchCycleRow.h

Go to the documentation of this file.
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 using std::vector;
00041 using std::string;
00042 using std::set;
00043 
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::SwitchCycleRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <ArrayTime.h>
00055 using  asdm::ArrayTime;
00056 
00057 #include <Angle.h>
00058 using  asdm::Angle;
00059 
00060 #include <Interval.h>
00061 using  asdm::Interval;
00062 
00063 #include <Tag.h>
00064 using  asdm::Tag;
00065 
00066 #include <Frequency.h>
00067 using  asdm::Frequency;
00068 
00069 
00070 
00071 
00072         
00073 
00074         
00075 
00076         
00077 
00078         
00079 
00080         
00081 
00082         
00083 
00084         
00085 #include "CDirectionReferenceCode.h"
00086 using namespace DirectionReferenceCodeMod;
00087         
00088 
00089         
00090 
00091 
00092 
00093 #include <ConversionException.h>
00094 #include <NoSuchRow.h>
00095 #include <IllegalAccessException.h>
00096 
00097 
00098 /*\file SwitchCycle.h
00099     \brief Generated from model's revision "1.55", branch "HEAD"
00100 */
00101 
00102 namespace asdm {
00103 
00104 //class asdm::SwitchCycleTable;
00105 
00106         
00107 
00108 class SwitchCycleRow;
00109 typedef void (SwitchCycleRow::*SwitchCycleAttributeFromBin) (EndianISStream& eiss);
00110 
00117 class SwitchCycleRow {
00118 friend class asdm::SwitchCycleTable;
00119 
00120 public:
00121 
00122         virtual ~SwitchCycleRow();
00123 
00127         SwitchCycleTable &getTable() const;
00128         
00133         bool isAdded() const;
00134                 
00136         // Intrinsic Table Attributes //
00138         
00139         
00140         // ===> Attribute switchCycleId
00141         
00142         
00143         
00144 
00145         
00150         Tag getSwitchCycleId() const;
00151         
00152  
00153         
00154         
00155         
00156         
00157 
00158 
00159         
00160         // ===> Attribute numStep
00161         
00162         
00163         
00164 
00165         
00170         int getNumStep() const;
00171         
00172  
00173         
00174         
00182         void setNumStep (int numStep);
00183                 
00184         
00185         
00186         
00187 
00188 
00189         
00190         // ===> Attribute weightArray
00191         
00192         
00193         
00194 
00195         
00200         vector<float > getWeightArray() const;
00201         
00202  
00203         
00204         
00212         void setWeightArray (vector<float > weightArray);
00213                 
00214         
00215         
00216         
00217 
00218 
00219         
00220         // ===> Attribute dirOffsetArray
00221         
00222         
00223         
00224 
00225         
00230         vector<vector<Angle > > getDirOffsetArray() const;
00231         
00232  
00233         
00234         
00242         void setDirOffsetArray (vector<vector<Angle > > dirOffsetArray);
00243                 
00244         
00245         
00246         
00247 
00248 
00249         
00250         // ===> Attribute freqOffsetArray
00251         
00252         
00253         
00254 
00255         
00260         vector<Frequency > getFreqOffsetArray() const;
00261         
00262  
00263         
00264         
00272         void setFreqOffsetArray (vector<Frequency > freqOffsetArray);
00273                 
00274         
00275         
00276         
00277 
00278 
00279         
00280         // ===> Attribute stepDurationArray
00281         
00282         
00283         
00284 
00285         
00290         vector<Interval > getStepDurationArray() const;
00291         
00292  
00293         
00294         
00302         void setStepDurationArray (vector<Interval > stepDurationArray);
00303                 
00304         
00305         
00306         
00307 
00308 
00309         
00310         // ===> Attribute directionCode, which is optional
00311         
00312         
00313         
00318         bool isDirectionCodeExists() const;
00319         
00320 
00321         
00327         DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const;
00328         
00329  
00330         
00331         
00338         void setDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode directionCode);
00339                 
00340         
00341         
00342         
00346         void clearDirectionCode ();
00347         
00348 
00349 
00350         
00351         // ===> Attribute directionEquinox, which is optional
00352         
00353         
00354         
00359         bool isDirectionEquinoxExists() const;
00360         
00361 
00362         
00368         ArrayTime getDirectionEquinox() const;
00369         
00370  
00371         
00372         
00379         void setDirectionEquinox (ArrayTime directionEquinox);
00380                 
00381         
00382         
00383         
00387         void clearDirectionEquinox ();
00388         
00389 
00390 
00392         // Extrinsic Table Attributes //
00394         
00396         // Links //
00398         
00399         
00400         
00401         
00417         bool compareNoAutoInc(int numStep, vector<float > weightArray, vector<vector<Angle > > dirOffsetArray, vector<Frequency > freqOffsetArray, vector<Interval > stepDurationArray);
00418         
00419         
00420 
00421         
00437         bool compareRequiredValue(int numStep, vector<float > weightArray, vector<vector<Angle > > dirOffsetArray, vector<Frequency > freqOffsetArray, vector<Interval > stepDurationArray); 
00438                  
00439         
00448         bool equalByRequiredValue(SwitchCycleRow* x) ;
00449         
00450 #ifndef WITHOUT_ACS
00451 
00455         SwitchCycleRowIDL *toIDL() const;
00456 #endif
00457         
00458 #ifndef WITHOUT_ACS
00459 
00464         void setFromIDL (SwitchCycleRowIDL x) ;
00465 #endif
00466         
00471         string toXML() const;
00472 
00479         void setFromXML (string rowDoc) ;       
00480 
00481 private:
00485         SwitchCycleTable &table;
00489         bool hasBeenAdded;
00490 
00491         // This method is used by the Table class when this row is added to the table.
00492         void isAdded(bool added);
00493 
00494 
00503         SwitchCycleRow (SwitchCycleTable &table);
00504 
00522          SwitchCycleRow (SwitchCycleTable &table, SwitchCycleRow &row);
00523                 
00525         // Intrinsic Table Attributes //
00527         
00528         
00529         // ===> Attribute switchCycleId
00530         
00531         
00532 
00533         Tag switchCycleId;
00534 
00535         
00536         
00537         
00547         void setSwitchCycleId (Tag switchCycleId);
00548                 
00549         
00550 
00551         
00552         // ===> Attribute numStep
00553         
00554         
00555 
00556         int numStep;
00557 
00558         
00559         
00560         
00561 
00562         
00563         // ===> Attribute weightArray
00564         
00565         
00566 
00567         vector<float > weightArray;
00568 
00569         
00570         
00571         
00572 
00573         
00574         // ===> Attribute dirOffsetArray
00575         
00576         
00577 
00578         vector<vector<Angle > > dirOffsetArray;
00579 
00580         
00581         
00582         
00583 
00584         
00585         // ===> Attribute freqOffsetArray
00586         
00587         
00588 
00589         vector<Frequency > freqOffsetArray;
00590 
00591         
00592         
00593         
00594 
00595         
00596         // ===> Attribute stepDurationArray
00597         
00598         
00599 
00600         vector<Interval > stepDurationArray;
00601 
00602         
00603         
00604         
00605 
00606         
00607         // ===> Attribute directionCode, which is optional
00608         
00609         
00610         bool directionCodeExists;
00611         
00612 
00613         DirectionReferenceCodeMod::DirectionReferenceCode directionCode;
00614 
00615         
00616         
00617         
00618 
00619         
00620         // ===> Attribute directionEquinox, which is optional
00621         
00622         
00623         bool directionEquinoxExists;
00624         
00625 
00626         ArrayTime directionEquinox;
00627 
00628         
00629         
00630         
00631 
00633         // Extrinsic Table Attributes //
00635         
00637         // Links //
00639         
00640         
00642         // binary-deserialization material//
00644         map<string, SwitchCycleAttributeFromBin> fromBinMethods;
00645 void switchCycleIdFromBin( EndianISStream& eiss);
00646 void numStepFromBin( EndianISStream& eiss);
00647 void weightArrayFromBin( EndianISStream& eiss);
00648 void dirOffsetArrayFromBin( EndianISStream& eiss);
00649 void freqOffsetArrayFromBin( EndianISStream& eiss);
00650 void stepDurationArrayFromBin( EndianISStream& eiss);
00651 
00652 void directionCodeFromBin( EndianISStream& eiss);
00653 void directionEquinoxFromBin( EndianISStream& eiss);
00654         
00655         
00660          void toBin(EndianOSStream& eoss);
00661                  
00669          static SwitchCycleRow* fromBin(EndianISStream& eiss, SwitchCycleTable& table, const vector<string>& attributesSeq);     
00670 
00671 };
00672 
00673 } // End namespace asdm
00674 
00675 #endif /* SwitchCycle_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines