casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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 
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.61", 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);     
00512 
00513 private:
00517         SwitchCycleTable &table;
00521         bool hasBeenAdded;
00522 
00523         // This method is used by the Table class when this row is added to the table.
00524         void isAdded(bool added);
00525 
00526 
00535         SwitchCycleRow (SwitchCycleTable &table);
00536 
00554          SwitchCycleRow (SwitchCycleTable &table, SwitchCycleRow &row);
00555                 
00557         // Intrinsic Table Attributes //
00559         
00560         
00561         // ===> Attribute switchCycleId
00562         
00563         
00564 
00565         Tag switchCycleId;
00566 
00567         
00568         
00569         
00579         void setSwitchCycleId (Tag switchCycleId);
00580                 
00581         
00582 
00583         
00584         // ===> Attribute numStep
00585         
00586         
00587 
00588         int numStep;
00589 
00590         
00591         
00592         
00593 
00594         
00595         // ===> Attribute weightArray
00596         
00597         
00598 
00599         vector<float > weightArray;
00600 
00601         
00602         
00603         
00604 
00605         
00606         // ===> Attribute dirOffsetArray
00607         
00608         
00609 
00610         vector<vector<Angle > > dirOffsetArray;
00611 
00612         
00613         
00614         
00615 
00616         
00617         // ===> Attribute freqOffsetArray
00618         
00619         
00620 
00621         vector<Frequency > freqOffsetArray;
00622 
00623         
00624         
00625         
00626 
00627         
00628         // ===> Attribute stepDurationArray
00629         
00630         
00631 
00632         vector<Interval > stepDurationArray;
00633 
00634         
00635         
00636         
00637 
00638         
00639         // ===> Attribute directionCode, which is optional
00640         
00641         
00642         bool directionCodeExists;
00643         
00644 
00645         DirectionReferenceCodeMod::DirectionReferenceCode directionCode;
00646 
00647         
00648         
00649         
00650 
00651         
00652         // ===> Attribute directionEquinox, which is optional
00653         
00654         
00655         bool directionEquinoxExists;
00656         
00657 
00658         ArrayTime directionEquinox;
00659 
00660         
00661         
00662         
00663 
00665         // Extrinsic Table Attributes //
00667         
00669         // Links //
00671         
00672         
00673 /*
00675         // binary-deserialization material from an EndianIStream  //
00677         std::map<std::string, SwitchCycleAttributeFromBin> fromBinMethods;
00678 void switchCycleIdFromBin( EndianIStream& eis);
00679 void numStepFromBin( EndianIStream& eis);
00680 void weightArrayFromBin( EndianIStream& eis);
00681 void dirOffsetArrayFromBin( EndianIStream& eis);
00682 void freqOffsetArrayFromBin( EndianIStream& eis);
00683 void stepDurationArrayFromBin( EndianIStream& eis);
00684 
00685 void directionCodeFromBin( EndianIStream& eis);
00686 void directionEquinoxFromBin( EndianIStream& eis);
00687 
00688 */
00689         
00691         // text-deserialization material //
00693         std::map<std::string, SwitchCycleAttributeFromText> fromTextMethods;
00694         
00695 void switchCycleIdFromText (const string & s);
00696         
00697         
00698 void numStepFromText (const string & s);
00699         
00700         
00701 void weightArrayFromText (const string & s);
00702         
00703         
00704 void dirOffsetArrayFromText (const string & s);
00705         
00706         
00707 void freqOffsetArrayFromText (const string & s);
00708         
00709         
00710 void stepDurationArrayFromText (const string & s);
00711         
00712 
00713         
00714 void directionCodeFromText (const string & s);
00715         
00716         
00717 void directionEquinoxFromText (const string & s);
00718         
00719         
00720         
00721         void fromText(const std::string& attributeName, const std::string&  t);
00722         
00727          void toBin(EndianOSStream& eoss);
00728                  
00738 };
00739 
00740 } // End namespace asdm
00741 
00742 #endif /* SwitchCycle_CLASS */