FlagRow.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 FlagRow.h
00032  */
00033  
00034 #ifndef FlagRow_CLASS
00035 #define FlagRow_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::FlagRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <ArrayTime.h>
00055 using  asdm::ArrayTime;
00056 
00057 #include <Tag.h>
00058 using  asdm::Tag;
00059 
00060 
00061 
00062 
00063         
00064 
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 #include "CPolarizationType.h"
00081 using namespace PolarizationTypeMod;
00082         
00083 
00084 
00085 
00086 #include <ConversionException.h>
00087 #include <NoSuchRow.h>
00088 #include <IllegalAccessException.h>
00089 
00090 
00091 /*\file Flag.h
00092     \brief Generated from model's revision "1.55", branch "HEAD"
00093 */
00094 
00095 namespace asdm {
00096 
00097 //class asdm::FlagTable;
00098 
00099 
00100 // class asdm::AntennaRow;
00101 class AntennaRow;
00102 
00103 // class asdm::AntennaRow;
00104 class AntennaRow;
00105 
00106 // class asdm::SpectralWindowRow;
00107 class SpectralWindowRow;
00108         
00109 
00110 class FlagRow;
00111 typedef void (FlagRow::*FlagAttributeFromBin) (EndianISStream& eiss);
00112 
00119 class FlagRow {
00120 friend class asdm::FlagTable;
00121 
00122 public:
00123 
00124         virtual ~FlagRow();
00125 
00129         FlagTable &getTable() const;
00130         
00135         bool isAdded() const;
00136                 
00138         // Intrinsic Table Attributes //
00140         
00141         
00142         // ===> Attribute flagId
00143         
00144         
00145         
00146 
00147         
00152         Tag getFlagId() const;
00153         
00154  
00155         
00156         
00157         
00158         
00159 
00160 
00161         
00162         // ===> Attribute startTime
00163         
00164         
00165         
00166 
00167         
00172         ArrayTime getStartTime() const;
00173         
00174  
00175         
00176         
00184         void setStartTime (ArrayTime startTime);
00185                 
00186         
00187         
00188         
00189 
00190 
00191         
00192         // ===> Attribute endTime
00193         
00194         
00195         
00196 
00197         
00202         ArrayTime getEndTime() const;
00203         
00204  
00205         
00206         
00214         void setEndTime (ArrayTime endTime);
00215                 
00216         
00217         
00218         
00219 
00220 
00221         
00222         // ===> Attribute reason
00223         
00224         
00225         
00226 
00227         
00232         string getReason() const;
00233         
00234  
00235         
00236         
00244         void setReason (string reason);
00245                 
00246         
00247         
00248         
00249 
00250 
00251         
00252         // ===> Attribute numAntenna
00253         
00254         
00255         
00256 
00257         
00262         int getNumAntenna() const;
00263         
00264  
00265         
00266         
00274         void setNumAntenna (int numAntenna);
00275                 
00276         
00277         
00278         
00279 
00280 
00281         
00282         // ===> Attribute numPolarizationType, which is optional
00283         
00284         
00285         
00290         bool isNumPolarizationTypeExists() const;
00291         
00292 
00293         
00299         int getNumPolarizationType() const;
00300         
00301  
00302         
00303         
00310         void setNumPolarizationType (int numPolarizationType);
00311                 
00312         
00313         
00314         
00318         void clearNumPolarizationType ();
00319         
00320 
00321 
00322         
00323         // ===> Attribute numSpectralWindow, which is optional
00324         
00325         
00326         
00331         bool isNumSpectralWindowExists() const;
00332         
00333 
00334         
00340         int getNumSpectralWindow() const;
00341         
00342  
00343         
00344         
00351         void setNumSpectralWindow (int numSpectralWindow);
00352                 
00353         
00354         
00355         
00359         void clearNumSpectralWindow ();
00360         
00361 
00362 
00363         
00364         // ===> Attribute numPairedAntenna, which is optional
00365         
00366         
00367         
00372         bool isNumPairedAntennaExists() const;
00373         
00374 
00375         
00381         int getNumPairedAntenna() const;
00382         
00383  
00384         
00385         
00392         void setNumPairedAntenna (int numPairedAntenna);
00393                 
00394         
00395         
00396         
00400         void clearNumPairedAntenna ();
00401         
00402 
00403 
00404         
00405         // ===> Attribute polarizationType, which is optional
00406         
00407         
00408         
00413         bool isPolarizationTypeExists() const;
00414         
00415 
00416         
00422         vector<PolarizationTypeMod::PolarizationType > getPolarizationType() const;
00423         
00424  
00425         
00426         
00433         void setPolarizationType (vector<PolarizationTypeMod::PolarizationType > polarizationType);
00434                 
00435         
00436         
00437         
00441         void clearPolarizationType ();
00442         
00443 
00444 
00446         // Extrinsic Table Attributes //
00448         
00449         
00450         // ===> Attribute antennaId
00451         
00452         
00453         
00454 
00455         
00460         vector<Tag>  getAntennaId() const;
00461         
00462  
00463         
00464         
00472         void setAntennaId (vector<Tag>  antennaId);
00473                 
00474         
00475         
00476         
00477 
00478 
00479         
00480         // ===> Attribute pairedAntennaId, which is optional
00481         
00482         
00483         
00488         bool isPairedAntennaIdExists() const;
00489         
00490 
00491         
00497         vector<Tag>  getPairedAntennaId() const;
00498         
00499  
00500         
00501         
00508         void setPairedAntennaId (vector<Tag>  pairedAntennaId);
00509                 
00510         
00511         
00512         
00516         void clearPairedAntennaId ();
00517         
00518 
00519 
00520         
00521         // ===> Attribute spectralWindowId, which is optional
00522         
00523         
00524         
00529         bool isSpectralWindowIdExists() const;
00530         
00531 
00532         
00538         vector<Tag>  getSpectralWindowId() const;
00539         
00540  
00541         
00542         
00549         void setSpectralWindowId (vector<Tag>  spectralWindowId);
00550                 
00551         
00552         
00553         
00557         void clearSpectralWindowId ();
00558         
00559 
00560 
00562         // Links //
00564         
00565         
00566                 
00574         void setAntennaId (int i, Tag antennaId); 
00575                         
00576         
00577 
00578         
00579                  
00584  void addAntennaId(Tag id); 
00585 
00590  void addAntennaId(const vector<Tag> & id); 
00591  
00592 
00598  const Tag getAntennaId(int i);
00599  
00607  AntennaRow* getAntennaUsingAntennaId(int i); 
00608  
00613  vector<AntennaRow *> getAntennasUsingAntennaId(); 
00614   
00615 
00616         
00617 
00618         
00619                 
00626         void setPairedAntennaId (int i, Tag pairedAntennaId)  ;
00627                         
00628         
00629 
00630         
00631                  
00636  void addPairedAntennaId(Tag id); 
00637 
00642  void addPairedAntennaId(const vector<Tag> & id); 
00643  
00644 
00650  const Tag getPairedAntennaId(int i);
00651  
00659  AntennaRow* getAntennaUsingPairedAntennaId(int i); 
00660  
00665  vector<AntennaRow *> getAntennasUsingPairedAntennaId(); 
00666   
00667 
00668         
00669 
00670         
00671                 
00678         void setSpectralWindowId (int i, Tag spectralWindowId)  ;
00679                         
00680         
00681 
00682         
00683                  
00688  void addSpectralWindowId(Tag id); 
00689 
00694  void addSpectralWindowId(const vector<Tag> & id); 
00695  
00696 
00702  const Tag getSpectralWindowId(int i);
00703  
00711  SpectralWindowRow* getSpectralWindowUsingSpectralWindowId(int i); 
00712  
00717  vector<SpectralWindowRow *> getSpectralWindowsUsingSpectralWindowId(); 
00718   
00719 
00720         
00721 
00722         
00723         
00724         
00740         bool compareNoAutoInc(ArrayTime startTime, ArrayTime endTime, string reason, int numAntenna, vector<Tag>  antennaId);
00741         
00742         
00743 
00744         
00760         bool compareRequiredValue(ArrayTime startTime, ArrayTime endTime, string reason, int numAntenna, vector<Tag>  antennaId); 
00761                  
00762         
00771         bool equalByRequiredValue(FlagRow* x) ;
00772         
00773 #ifndef WITHOUT_ACS
00774 
00778         FlagRowIDL *toIDL() const;
00779 #endif
00780         
00781 #ifndef WITHOUT_ACS
00782 
00787         void setFromIDL (FlagRowIDL x) ;
00788 #endif
00789         
00794         string toXML() const;
00795 
00802         void setFromXML (string rowDoc) ;       
00803 
00804 private:
00808         FlagTable &table;
00812         bool hasBeenAdded;
00813 
00814         // This method is used by the Table class when this row is added to the table.
00815         void isAdded(bool added);
00816 
00817 
00826         FlagRow (FlagTable &table);
00827 
00845          FlagRow (FlagTable &table, FlagRow &row);
00846                 
00848         // Intrinsic Table Attributes //
00850         
00851         
00852         // ===> Attribute flagId
00853         
00854         
00855 
00856         Tag flagId;
00857 
00858         
00859         
00860         
00870         void setFlagId (Tag flagId);
00871                 
00872         
00873 
00874         
00875         // ===> Attribute startTime
00876         
00877         
00878 
00879         ArrayTime startTime;
00880 
00881         
00882         
00883         
00884 
00885         
00886         // ===> Attribute endTime
00887         
00888         
00889 
00890         ArrayTime endTime;
00891 
00892         
00893         
00894         
00895 
00896         
00897         // ===> Attribute reason
00898         
00899         
00900 
00901         string reason;
00902 
00903         
00904         
00905         
00906 
00907         
00908         // ===> Attribute numAntenna
00909         
00910         
00911 
00912         int numAntenna;
00913 
00914         
00915         
00916         
00917 
00918         
00919         // ===> Attribute numPolarizationType, which is optional
00920         
00921         
00922         bool numPolarizationTypeExists;
00923         
00924 
00925         int numPolarizationType;
00926 
00927         
00928         
00929         
00930 
00931         
00932         // ===> Attribute numSpectralWindow, which is optional
00933         
00934         
00935         bool numSpectralWindowExists;
00936         
00937 
00938         int numSpectralWindow;
00939 
00940         
00941         
00942         
00943 
00944         
00945         // ===> Attribute numPairedAntenna, which is optional
00946         
00947         
00948         bool numPairedAntennaExists;
00949         
00950 
00951         int numPairedAntenna;
00952 
00953         
00954         
00955         
00956 
00957         
00958         // ===> Attribute polarizationType, which is optional
00959         
00960         
00961         bool polarizationTypeExists;
00962         
00963 
00964         vector<PolarizationTypeMod::PolarizationType > polarizationType;
00965 
00966         
00967         
00968         
00969 
00971         // Extrinsic Table Attributes //
00973         
00974         
00975         // ===> Attribute antennaId
00976         
00977         
00978 
00979         vector<Tag>  antennaId;
00980 
00981         
00982         
00983         
00984 
00985         
00986         // ===> Attribute pairedAntennaId, which is optional
00987         
00988         
00989         bool pairedAntennaIdExists;
00990         
00991 
00992         vector<Tag>  pairedAntennaId;
00993 
00994         
00995         
00996         
00997 
00998         
00999         // ===> Attribute spectralWindowId, which is optional
01000         
01001         
01002         bool spectralWindowIdExists;
01003         
01004 
01005         vector<Tag>  spectralWindowId;
01006 
01007         
01008         
01009         
01010 
01012         // Links //
01014         
01015         
01016                 
01017 
01018 
01019         
01020 
01021         
01022                 
01023 
01024 
01025         
01026 
01027         
01028                 
01029 
01030 
01031         
01032 
01033         
01035         // binary-deserialization material//
01037         map<string, FlagAttributeFromBin> fromBinMethods;
01038 void flagIdFromBin( EndianISStream& eiss);
01039 void startTimeFromBin( EndianISStream& eiss);
01040 void endTimeFromBin( EndianISStream& eiss);
01041 void reasonFromBin( EndianISStream& eiss);
01042 void numAntennaFromBin( EndianISStream& eiss);
01043 void antennaIdFromBin( EndianISStream& eiss);
01044 
01045 void numPolarizationTypeFromBin( EndianISStream& eiss);
01046 void numSpectralWindowFromBin( EndianISStream& eiss);
01047 void numPairedAntennaFromBin( EndianISStream& eiss);
01048 void polarizationTypeFromBin( EndianISStream& eiss);
01049 void pairedAntennaIdFromBin( EndianISStream& eiss);
01050 void spectralWindowIdFromBin( EndianISStream& eiss);
01051         
01052         
01057          void toBin(EndianOSStream& eoss);
01058                  
01066          static FlagRow* fromBin(EndianISStream& eiss, FlagTable& table, const vector<string>& attributesSeq);   
01067 
01068 };
01069 
01070 } // End namespace asdm
01071 
01072 #endif /* Flag_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines