casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PointingModelRow.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 PointingModelRow.h
00032  */
00033  
00034 #ifndef PointingModelRow_CLASS
00035 #define PointingModelRow_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 <Tag.h>
00052         
00053 
00054 
00055 
00056 
00057         
00058 
00059         
00060 
00061         
00062 
00063         
00064 
00065         
00066 #include "CPolarizationType.h"
00067         
00068 
00069         
00070 #include "CReceiverBand.h"
00071         
00072 
00073         
00074 
00075         
00076 
00077 
00078 
00079 #include <ConversionException.h>
00080 #include <NoSuchRow.h>
00081 #include <IllegalAccessException.h>
00082 
00083 #include <RowTransformer.h>
00084 //#include <TableStreamReader.h>
00085 
00086 /*\file PointingModel.h
00087     \brief Generated from model's revision "1.64", branch "HEAD"
00088 */
00089 
00090 namespace asdm {
00091 
00092 //class asdm::PointingModelTable;
00093 
00094 
00095 // class asdm::PointingModelRow;
00096 class PointingModelRow;
00097 
00098 // class asdm::AntennaRow;
00099 class AntennaRow;
00100         
00101 
00102 class PointingModelRow;
00103 typedef void (PointingModelRow::*PointingModelAttributeFromBin) (EndianIStream& eis);
00104 typedef void (PointingModelRow::*PointingModelAttributeFromText) (const string& s);
00105 
00112 class PointingModelRow {
00113 friend class asdm::PointingModelTable;
00114 friend class asdm::RowTransformer<PointingModelRow>;
00115 //friend class asdm::TableStreamReader<PointingModelTable, PointingModelRow>;
00116 
00117 public:
00118 
00119         virtual ~PointingModelRow();
00120 
00124         PointingModelTable &getTable() const;
00125         
00130         bool isAdded() const;
00131                 
00133         // Intrinsic Table Attributes //
00135         
00136         
00137         // ===> Attribute pointingModelId
00138         
00139         
00140         
00141 
00142         
00147         int getPointingModelId() const;
00148         
00149  
00150         
00151         
00152         
00153         
00154 
00155 
00156         
00157         // ===> Attribute numCoeff
00158         
00159         
00160         
00161 
00162         
00167         int getNumCoeff() const;
00168         
00169  
00170         
00171         
00179         void setNumCoeff (int numCoeff);
00180                 
00181         
00182         
00183         
00184 
00185 
00186         
00187         // ===> Attribute coeffName
00188         
00189         
00190         
00191 
00192         
00197         vector<string > getCoeffName() const;
00198         
00199  
00200         
00201         
00209         void setCoeffName (vector<string > coeffName);
00210                 
00211         
00212         
00213         
00214 
00215 
00216         
00217         // ===> Attribute coeffVal
00218         
00219         
00220         
00221 
00222         
00227         vector<float > getCoeffVal() const;
00228         
00229  
00230         
00231         
00239         void setCoeffVal (vector<float > coeffVal);
00240                 
00241         
00242         
00243         
00244 
00245 
00246         
00247         // ===> Attribute polarizationType
00248         
00249         
00250         
00251 
00252         
00257         PolarizationTypeMod::PolarizationType getPolarizationType() const;
00258         
00259  
00260         
00261         
00269         void setPolarizationType (PolarizationTypeMod::PolarizationType polarizationType);
00270                 
00271         
00272         
00273         
00274 
00275 
00276         
00277         // ===> Attribute receiverBand
00278         
00279         
00280         
00281 
00282         
00287         ReceiverBandMod::ReceiverBand getReceiverBand() const;
00288         
00289  
00290         
00291         
00299         void setReceiverBand (ReceiverBandMod::ReceiverBand receiverBand);
00300                 
00301         
00302         
00303         
00304 
00305 
00306         
00307         // ===> Attribute assocNature
00308         
00309         
00310         
00311 
00312         
00317         string getAssocNature() const;
00318         
00319  
00320         
00321         
00329         void setAssocNature (string assocNature);
00330                 
00331         
00332         
00333         
00334 
00335 
00336         
00337         // ===> Attribute coeffFormula, which is optional
00338         
00339         
00340         
00345         bool isCoeffFormulaExists() const;
00346         
00347 
00348         
00354         vector<string > getCoeffFormula() const;
00355         
00356  
00357         
00358         
00365         void setCoeffFormula (vector<string > coeffFormula);
00366                 
00367         
00368         
00369         
00373         void clearCoeffFormula ();
00374         
00375 
00376 
00378         // Extrinsic Table Attributes //
00380         
00381         
00382         // ===> Attribute antennaId
00383         
00384         
00385         
00386 
00387         
00392         Tag getAntennaId() const;
00393         
00394  
00395         
00396         
00406         void setAntennaId (Tag antennaId);
00407                 
00408         
00409         
00410         
00411 
00412 
00413         
00414         // ===> Attribute assocPointingModelId
00415         
00416         
00417         
00418 
00419         
00424         int getAssocPointingModelId() const;
00425         
00426  
00427         
00428         
00436         void setAssocPointingModelId (int assocPointingModelId);
00437                 
00438         
00439         
00440         
00441 
00442 
00444         // Links //
00446         
00447         
00448 
00449         
00450                 
00451         // ===> Slice link from a row of PointingModel table to a collection of row of PointingModel table.
00452         
00458         vector <PointingModelRow *> getPointingModels();
00459         
00460         
00461 
00462         
00463 
00464         
00465 
00466         
00467                 
00474          AntennaRow* getAntennaUsingAntennaId();
00475          
00476 
00477         
00478 
00479         
00480         
00481         
00503         bool compareNoAutoInc(Tag antennaId, int numCoeff, vector<string > coeffName, vector<float > coeffVal, PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, string assocNature, int assocPointingModelId);
00504         
00505         
00506 
00507         
00527         bool compareRequiredValue(int numCoeff, vector<string > coeffName, vector<float > coeffVal, PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, string assocNature, int assocPointingModelId); 
00528                  
00529         
00538         bool equalByRequiredValue(PointingModelRow* x) ;
00539         
00540 #ifndef WITHOUT_ACS
00541 
00545         asdmIDL::PointingModelRowIDL *toIDL() const;
00546         
00554          void toIDL(asdmIDL::PointingModelRowIDL& x) const;
00555 #endif
00556         
00557 #ifndef WITHOUT_ACS
00558 
00563         void setFromIDL (asdmIDL::PointingModelRowIDL x) ;
00564 #endif
00565         
00570         std::string toXML() const;
00571 
00578         void setFromXML (std::string rowDoc) ;
00579 
00582         // binary-deserialization material from an EndianIStream  //
00584 
00585         std::map<std::string, PointingModelAttributeFromBin> fromBinMethods;
00586 void antennaIdFromBin( EndianIStream& eis);
00587 void pointingModelIdFromBin( EndianIStream& eis);
00588 void numCoeffFromBin( EndianIStream& eis);
00589 void coeffNameFromBin( EndianIStream& eis);
00590 void coeffValFromBin( EndianIStream& eis);
00591 void polarizationTypeFromBin( EndianIStream& eis);
00592 void receiverBandFromBin( EndianIStream& eis);
00593 void assocNatureFromBin( EndianIStream& eis);
00594 void assocPointingModelIdFromBin( EndianIStream& eis);
00595 
00596 void coeffFormulaFromBin( EndianIStream& eis);
00597 
00598 
00606          static PointingModelRow* fromBin(EndianIStream& eis, PointingModelTable& table, const std::vector<std::string>& attributesSeq);         
00607  
00614          void fromText(const std::string& attributeName, const std::string&  t);
00616 
00617 private:
00621         PointingModelTable &table;
00625         bool hasBeenAdded;
00626 
00627         // This method is used by the Table class when this row is added to the table.
00628         void isAdded(bool added);
00629 
00630 
00639         PointingModelRow (PointingModelTable &table);
00640 
00658          PointingModelRow (PointingModelTable &table, PointingModelRow &row);
00659                 
00661         // Intrinsic Table Attributes //
00663         
00664         
00665         // ===> Attribute pointingModelId
00666         
00667         
00668 
00669         int pointingModelId;
00670 
00671         
00672         
00673         
00683         void setPointingModelId (int pointingModelId);
00684                 
00685         
00686 
00687         
00688         // ===> Attribute numCoeff
00689         
00690         
00691 
00692         int numCoeff;
00693 
00694         
00695         
00696         
00697 
00698         
00699         // ===> Attribute coeffName
00700         
00701         
00702 
00703         vector<string > coeffName;
00704 
00705         
00706         
00707         
00708 
00709         
00710         // ===> Attribute coeffVal
00711         
00712         
00713 
00714         vector<float > coeffVal;
00715 
00716         
00717         
00718         
00719 
00720         
00721         // ===> Attribute polarizationType
00722         
00723         
00724 
00725         PolarizationTypeMod::PolarizationType polarizationType;
00726 
00727         
00728         
00729         
00730 
00731         
00732         // ===> Attribute receiverBand
00733         
00734         
00735 
00736         ReceiverBandMod::ReceiverBand receiverBand;
00737 
00738         
00739         
00740         
00741 
00742         
00743         // ===> Attribute assocNature
00744         
00745         
00746 
00747         string assocNature;
00748 
00749         
00750         
00751         
00752 
00753         
00754         // ===> Attribute coeffFormula, which is optional
00755         
00756         
00757         bool coeffFormulaExists;
00758         
00759 
00760         vector<string > coeffFormula;
00761 
00762         
00763         
00764         
00765 
00767         // Extrinsic Table Attributes //
00769         
00770         
00771         // ===> Attribute antennaId
00772         
00773         
00774 
00775         Tag antennaId;
00776 
00777         
00778         
00779         
00780 
00781         
00782         // ===> Attribute assocPointingModelId
00783         
00784         
00785 
00786         int assocPointingModelId;
00787 
00788         
00789         
00790         
00791 
00793         // Links //
00795         
00796         
00797                 
00798 
00799 
00800         
00801 
00802         
00803                 
00804 
00805          
00806 
00807         
00808 
00809         
00810 /*
00812         // binary-deserialization material from an EndianIStream  //
00814         std::map<std::string, PointingModelAttributeFromBin> fromBinMethods;
00815 void antennaIdFromBin( EndianIStream& eis);
00816 void pointingModelIdFromBin( EndianIStream& eis);
00817 void numCoeffFromBin( EndianIStream& eis);
00818 void coeffNameFromBin( EndianIStream& eis);
00819 void coeffValFromBin( EndianIStream& eis);
00820 void polarizationTypeFromBin( EndianIStream& eis);
00821 void receiverBandFromBin( EndianIStream& eis);
00822 void assocNatureFromBin( EndianIStream& eis);
00823 void assocPointingModelIdFromBin( EndianIStream& eis);
00824 
00825 void coeffFormulaFromBin( EndianIStream& eis);
00826 
00827 */
00828         
00830         // text-deserialization material //
00832         std::map<std::string, PointingModelAttributeFromText> fromTextMethods;
00833         
00834 void antennaIdFromText (const string & s);
00835         
00836         
00837 void pointingModelIdFromText (const string & s);
00838         
00839         
00840 void numCoeffFromText (const string & s);
00841         
00842         
00843 void coeffNameFromText (const string & s);
00844         
00845         
00846 void coeffValFromText (const string & s);
00847         
00848         
00849 void polarizationTypeFromText (const string & s);
00850         
00851         
00852 void receiverBandFromText (const string & s);
00853         
00854         
00855 void assocNatureFromText (const string & s);
00856         
00857         
00858 void assocPointingModelIdFromText (const string & s);
00859         
00860 
00861         
00862 void coeffFormulaFromText (const string & s);
00863         
00864         
00865         
00870          void toBin(EndianOSStream& eoss);
00871                  
00881 };
00882 
00883 } // End namespace asdm
00884 
00885 #endif /* PointingModel_CLASS */