casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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 
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044 
00045 
00046 
00047 
00048 
00049 
00050          
00051 #include <Angle.h>
00052         
00053 
00054          
00055 #include <Tag.h>
00056         
00057 
00058          
00059 #include <Length.h>
00060         
00061 
00062          
00063 #include <ArrayTimeInterval.h>
00064         
00065 
00066 
00067 
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081 
00082 
00083 #include <ConversionException.h>
00084 #include <NoSuchRow.h>
00085 #include <IllegalAccessException.h>
00086 
00087 #include <RowTransformer.h>
00088 //#include <TableStreamReader.h>
00089 
00090 /*\file Focus.h
00091     \brief Generated from model's revision "1.61", branch "HEAD"
00092 */
00093 
00094 namespace asdm {
00095 
00096 //class asdm::FocusTable;
00097 
00098 
00099 // class asdm::AntennaRow;
00100 class AntennaRow;
00101 
00102 // class asdm::FocusModelRow;
00103 class FocusModelRow;
00104         
00105 
00106 class FocusRow;
00107 typedef void (FocusRow::*FocusAttributeFromBin) (EndianIStream& eis);
00108 typedef void (FocusRow::*FocusAttributeFromText) (const string& s);
00109 
00116 class FocusRow {
00117 friend class asdm::FocusTable;
00118 friend class asdm::RowTransformer<FocusRow>;
00119 //friend class asdm::TableStreamReader<FocusTable, FocusRow>;
00120 
00121 public:
00122 
00123         virtual ~FocusRow();
00124 
00128         FocusTable &getTable() const;
00129         
00134         bool isAdded() const;
00135                 
00137         // Intrinsic Table Attributes //
00139         
00140         
00141         // ===> Attribute timeInterval
00142         
00143         
00144         
00145 
00146         
00151         ArrayTimeInterval getTimeInterval() const;
00152         
00153  
00154         
00155         
00165         void setTimeInterval (ArrayTimeInterval timeInterval);
00166                 
00167         
00168         
00169         
00170 
00171 
00172         
00173         // ===> Attribute focusTracking
00174         
00175         
00176         
00177 
00178         
00183         bool getFocusTracking() const;
00184         
00185  
00186         
00187         
00195         void setFocusTracking (bool focusTracking);
00196                 
00197         
00198         
00199         
00200 
00201 
00202         
00203         // ===> Attribute focusOffset
00204         
00205         
00206         
00207 
00208         
00213         vector<Length > getFocusOffset() const;
00214         
00215  
00216         
00217         
00225         void setFocusOffset (vector<Length > focusOffset);
00226                 
00227         
00228         
00229         
00230 
00231 
00232         
00233         // ===> Attribute focusRotationOffset
00234         
00235         
00236         
00237 
00238         
00243         vector<Angle > getFocusRotationOffset() const;
00244         
00245  
00246         
00247         
00255         void setFocusRotationOffset (vector<Angle > focusRotationOffset);
00256                 
00257         
00258         
00259         
00260 
00261 
00262         
00263         // ===> Attribute measuredFocusPosition, which is optional
00264         
00265         
00266         
00271         bool isMeasuredFocusPositionExists() const;
00272         
00273 
00274         
00280         vector<Length > getMeasuredFocusPosition() const;
00281         
00282  
00283         
00284         
00291         void setMeasuredFocusPosition (vector<Length > measuredFocusPosition);
00292                 
00293         
00294         
00295         
00299         void clearMeasuredFocusPosition ();
00300         
00301 
00302 
00303         
00304         // ===> Attribute measuredFocusRotation, which is optional
00305         
00306         
00307         
00312         bool isMeasuredFocusRotationExists() const;
00313         
00314 
00315         
00321         vector<Angle > getMeasuredFocusRotation() const;
00322         
00323  
00324         
00325         
00332         void setMeasuredFocusRotation (vector<Angle > measuredFocusRotation);
00333                 
00334         
00335         
00336         
00340         void clearMeasuredFocusRotation ();
00341         
00342 
00343 
00345         // Extrinsic Table Attributes //
00347         
00348         
00349         // ===> Attribute antennaId
00350         
00351         
00352         
00353 
00354         
00359         Tag getAntennaId() const;
00360         
00361  
00362         
00363         
00373         void setAntennaId (Tag antennaId);
00374                 
00375         
00376         
00377         
00378 
00379 
00380         
00381         // ===> Attribute focusModelId
00382         
00383         
00384         
00385 
00386         
00391         int getFocusModelId() const;
00392         
00393  
00394         
00395         
00403         void setFocusModelId (int focusModelId);
00404                 
00405         
00406         
00407         
00408 
00409 
00411         // Links //
00413         
00414         
00415 
00416         
00417                 
00424          AntennaRow* getAntennaUsingAntennaId();
00425          
00426 
00427         
00428 
00429         
00430 
00431         
00432                 
00433         // ===> Slice link from a row of Focus table to a collection of row of FocusModel table.
00434         
00440         vector <FocusModelRow *> getFocusModels();
00441         
00442         
00443 
00444         
00445 
00446         
00447         
00448         
00466         bool compareNoAutoInc(Tag antennaId, ArrayTimeInterval timeInterval, bool focusTracking, vector<Length > focusOffset, vector<Angle > focusRotationOffset, int focusModelId);
00467         
00468         
00469 
00470         
00484         bool compareRequiredValue(bool focusTracking, vector<Length > focusOffset, vector<Angle > focusRotationOffset, int focusModelId); 
00485                  
00486         
00495         bool equalByRequiredValue(FocusRow* x) ;
00496         
00497 #ifndef WITHOUT_ACS
00498 
00502         asdmIDL::FocusRowIDL *toIDL() const;
00503 #endif
00504         
00505 #ifndef WITHOUT_ACS
00506 
00511         void setFromIDL (asdmIDL::FocusRowIDL x) ;
00512 #endif
00513         
00518         std::string toXML() const;
00519 
00526         void setFromXML (std::string rowDoc) ;
00527 
00530         // binary-deserialization material from an EndianIStream  //
00532 
00533         std::map<std::string, FocusAttributeFromBin> fromBinMethods;
00534 void antennaIdFromBin( EndianIStream& eis);
00535 void timeIntervalFromBin( EndianIStream& eis);
00536 void focusTrackingFromBin( EndianIStream& eis);
00537 void focusOffsetFromBin( EndianIStream& eis);
00538 void focusRotationOffsetFromBin( EndianIStream& eis);
00539 void focusModelIdFromBin( EndianIStream& eis);
00540 
00541 void measuredFocusPositionFromBin( EndianIStream& eis);
00542 void measuredFocusRotationFromBin( EndianIStream& eis);
00543 
00544 
00552          static FocusRow* fromBin(EndianIStream& eis, FocusTable& table, const std::vector<std::string>& attributesSeq);         
00554 
00555 private:
00559         FocusTable &table;
00563         bool hasBeenAdded;
00564 
00565         // This method is used by the Table class when this row is added to the table.
00566         void isAdded(bool added);
00567 
00568 
00577         FocusRow (FocusTable &table);
00578 
00596          FocusRow (FocusTable &table, FocusRow &row);
00597                 
00599         // Intrinsic Table Attributes //
00601         
00602         
00603         // ===> Attribute timeInterval
00604         
00605         
00606 
00607         ArrayTimeInterval timeInterval;
00608 
00609         
00610         
00611         
00612 
00613         
00614         // ===> Attribute focusTracking
00615         
00616         
00617 
00618         bool focusTracking;
00619 
00620         
00621         
00622         
00623 
00624         
00625         // ===> Attribute focusOffset
00626         
00627         
00628 
00629         vector<Length > focusOffset;
00630 
00631         
00632         
00633         
00634 
00635         
00636         // ===> Attribute focusRotationOffset
00637         
00638         
00639 
00640         vector<Angle > focusRotationOffset;
00641 
00642         
00643         
00644         
00645 
00646         
00647         // ===> Attribute measuredFocusPosition, which is optional
00648         
00649         
00650         bool measuredFocusPositionExists;
00651         
00652 
00653         vector<Length > measuredFocusPosition;
00654 
00655         
00656         
00657         
00658 
00659         
00660         // ===> Attribute measuredFocusRotation, which is optional
00661         
00662         
00663         bool measuredFocusRotationExists;
00664         
00665 
00666         vector<Angle > measuredFocusRotation;
00667 
00668         
00669         
00670         
00671 
00673         // Extrinsic Table Attributes //
00675         
00676         
00677         // ===> Attribute antennaId
00678         
00679         
00680 
00681         Tag antennaId;
00682 
00683         
00684         
00685         
00686 
00687         
00688         // ===> Attribute focusModelId
00689         
00690         
00691 
00692         int focusModelId;
00693 
00694         
00695         
00696         
00697 
00699         // Links //
00701         
00702         
00703                 
00704 
00705          
00706 
00707         
00708 
00709         
00710                 
00711 
00712 
00713         
00714 
00715         
00716 /*
00718         // binary-deserialization material from an EndianIStream  //
00720         std::map<std::string, FocusAttributeFromBin> fromBinMethods;
00721 void antennaIdFromBin( EndianIStream& eis);
00722 void timeIntervalFromBin( EndianIStream& eis);
00723 void focusTrackingFromBin( EndianIStream& eis);
00724 void focusOffsetFromBin( EndianIStream& eis);
00725 void focusRotationOffsetFromBin( EndianIStream& eis);
00726 void focusModelIdFromBin( EndianIStream& eis);
00727 
00728 void measuredFocusPositionFromBin( EndianIStream& eis);
00729 void measuredFocusRotationFromBin( EndianIStream& eis);
00730 
00731 */
00732         
00734         // text-deserialization material //
00736         std::map<std::string, FocusAttributeFromText> fromTextMethods;
00737         
00738 void antennaIdFromText (const string & s);
00739         
00740         
00741 void timeIntervalFromText (const string & s);
00742         
00743         
00744 void focusTrackingFromText (const string & s);
00745         
00746         
00747 void focusOffsetFromText (const string & s);
00748         
00749         
00750 void focusRotationOffsetFromText (const string & s);
00751         
00752         
00753 void focusModelIdFromText (const string & s);
00754         
00755 
00756         
00757 void measuredFocusPositionFromText (const string & s);
00758         
00759         
00760 void measuredFocusRotationFromText (const string & s);
00761         
00762         
00763         
00764         void fromText(const std::string& attributeName, const std::string&  t);
00765         
00770          void toBin(EndianOSStream& eoss);
00771                  
00781 };
00782 
00783 } // End namespace asdm
00784 
00785 #endif /* Focus_CLASS */