FocusRow.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 FocusRow.h
00032  */
00033  
00034 #ifndef FocusRow_CLASS
00035 #define FocusRow_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::FocusRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <Tag.h>
00055 using  asdm::Tag;
00056 
00057 #include <Length.h>
00058 using  asdm::Length;
00059 
00060 #include <ArrayTimeInterval.h>
00061 using  asdm::ArrayTimeInterval;
00062 
00063 
00064 
00065 
00066         
00067 
00068         
00069 
00070         
00071 
00072         
00073 
00074 
00075 
00076 #include <ConversionException.h>
00077 #include <NoSuchRow.h>
00078 #include <IllegalAccessException.h>
00079 
00080 
00081 /*\file Focus.h
00082     \brief Generated from model's revision "1.55", branch "HEAD"
00083 */
00084 
00085 namespace asdm {
00086 
00087 //class asdm::FocusTable;
00088 
00089 
00090 // class asdm::AntennaRow;
00091 class AntennaRow;
00092 
00093 // class asdm::FocusModelRow;
00094 class FocusModelRow;
00095         
00096 
00097 class FocusRow;
00098 typedef void (FocusRow::*FocusAttributeFromBin) (EndianISStream& eiss);
00099 
00106 class FocusRow {
00107 friend class asdm::FocusTable;
00108 
00109 public:
00110 
00111         virtual ~FocusRow();
00112 
00116         FocusTable &getTable() const;
00117         
00122         bool isAdded() const;
00123                 
00125         // Intrinsic Table Attributes //
00127         
00128         
00129         // ===> Attribute timeInterval
00130         
00131         
00132         
00133 
00134         
00139         ArrayTimeInterval getTimeInterval() const;
00140         
00141  
00142         
00143         
00153         void setTimeInterval (ArrayTimeInterval timeInterval);
00154                 
00155         
00156         
00157         
00158 
00159 
00160         
00161         // ===> Attribute focusTracking
00162         
00163         
00164         
00165 
00166         
00171         bool getFocusTracking() const;
00172         
00173  
00174         
00175         
00183         void setFocusTracking (bool focusTracking);
00184                 
00185         
00186         
00187         
00188 
00189 
00190         
00191         // ===> Attribute focusOffset
00192         
00193         
00194         
00195 
00196         
00201         vector<Length > getFocusOffset() const;
00202         
00203  
00204         
00205         
00213         void setFocusOffset (vector<Length > focusOffset);
00214                 
00215         
00216         
00217         
00218 
00219 
00220         
00221         // ===> Attribute measuredFocusPosition, which is optional
00222         
00223         
00224         
00229         bool isMeasuredFocusPositionExists() const;
00230         
00231 
00232         
00238         vector<Length > getMeasuredFocusPosition() const;
00239         
00240  
00241         
00242         
00249         void setMeasuredFocusPosition (vector<Length > measuredFocusPosition);
00250                 
00251         
00252         
00253         
00257         void clearMeasuredFocusPosition ();
00258         
00259 
00260 
00262         // Extrinsic Table Attributes //
00264         
00265         
00266         // ===> Attribute antennaId
00267         
00268         
00269         
00270 
00271         
00276         Tag getAntennaId() const;
00277         
00278  
00279         
00280         
00290         void setAntennaId (Tag antennaId);
00291                 
00292         
00293         
00294         
00295 
00296 
00297         
00298         // ===> Attribute focusModelId
00299         
00300         
00301         
00302 
00303         
00308         int getFocusModelId() const;
00309         
00310  
00311         
00312         
00320         void setFocusModelId (int focusModelId);
00321                 
00322         
00323         
00324         
00325 
00326 
00328         // Links //
00330         
00331         
00332 
00333         
00334                 
00341          AntennaRow* getAntennaUsingAntennaId();
00342          
00343 
00344         
00345 
00346         
00347 
00348         
00349                 
00350         // ===> Slice link from a row of Focus table to a collection of row of FocusModel table.
00351         
00357         vector <FocusModelRow *> getFocusModels();
00358         
00359         
00360 
00361         
00362 
00363         
00364         
00365         
00381         bool compareNoAutoInc(Tag antennaId, ArrayTimeInterval timeInterval, bool focusTracking, vector<Length > focusOffset, int focusModelId);
00382         
00383         
00384 
00385         
00397         bool compareRequiredValue(bool focusTracking, vector<Length > focusOffset, int focusModelId); 
00398                  
00399         
00408         bool equalByRequiredValue(FocusRow* x) ;
00409         
00410 #ifndef WITHOUT_ACS
00411 
00415         FocusRowIDL *toIDL() const;
00416 #endif
00417         
00418 #ifndef WITHOUT_ACS
00419 
00424         void setFromIDL (FocusRowIDL x) ;
00425 #endif
00426         
00431         string toXML() const;
00432 
00439         void setFromXML (string rowDoc) ;       
00440 
00441 private:
00445         FocusTable &table;
00449         bool hasBeenAdded;
00450 
00451         // This method is used by the Table class when this row is added to the table.
00452         void isAdded(bool added);
00453 
00454 
00463         FocusRow (FocusTable &table);
00464 
00482          FocusRow (FocusTable &table, FocusRow &row);
00483                 
00485         // Intrinsic Table Attributes //
00487         
00488         
00489         // ===> Attribute timeInterval
00490         
00491         
00492 
00493         ArrayTimeInterval timeInterval;
00494 
00495         
00496         
00497         
00498 
00499         
00500         // ===> Attribute focusTracking
00501         
00502         
00503 
00504         bool focusTracking;
00505 
00506         
00507         
00508         
00509 
00510         
00511         // ===> Attribute focusOffset
00512         
00513         
00514 
00515         vector<Length > focusOffset;
00516 
00517         
00518         
00519         
00520 
00521         
00522         // ===> Attribute measuredFocusPosition, which is optional
00523         
00524         
00525         bool measuredFocusPositionExists;
00526         
00527 
00528         vector<Length > measuredFocusPosition;
00529 
00530         
00531         
00532         
00533 
00535         // Extrinsic Table Attributes //
00537         
00538         
00539         // ===> Attribute antennaId
00540         
00541         
00542 
00543         Tag antennaId;
00544 
00545         
00546         
00547         
00548 
00549         
00550         // ===> Attribute focusModelId
00551         
00552         
00553 
00554         int focusModelId;
00555 
00556         
00557         
00558         
00559 
00561         // Links //
00563         
00564         
00565                 
00566 
00567          
00568 
00569         
00570 
00571         
00572                 
00573 
00574 
00575         
00576 
00577         
00579         // binary-deserialization material//
00581         map<string, FocusAttributeFromBin> fromBinMethods;
00582 void antennaIdFromBin( EndianISStream& eiss);
00583 void timeIntervalFromBin( EndianISStream& eiss);
00584 void focusTrackingFromBin( EndianISStream& eiss);
00585 void focusOffsetFromBin( EndianISStream& eiss);
00586 void focusModelIdFromBin( EndianISStream& eiss);
00587 
00588 void measuredFocusPositionFromBin( EndianISStream& eiss);
00589         
00590         
00595          void toBin(EndianOSStream& eoss);
00596                  
00604          static FocusRow* fromBin(EndianISStream& eiss, FocusTable& table, const vector<string>& attributesSeq);         
00605 
00606 };
00607 
00608 } // End namespace asdm
00609 
00610 #endif /* Focus_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines