casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PolarizationRow.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 PolarizationRow.h
00032  */
00033  
00034 #ifndef PolarizationRow_CLASS
00035 #define PolarizationRow_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 #include "CStokesParameter.h"
00063         
00064 
00065         
00066 #include "CPolarizationType.h"
00067         
00068 
00069 
00070 
00071 #include <ConversionException.h>
00072 #include <NoSuchRow.h>
00073 #include <IllegalAccessException.h>
00074 
00075 #include <RowTransformer.h>
00076 //#include <TableStreamReader.h>
00077 
00078 /*\file Polarization.h
00079     \brief Generated from model's revision "1.61", branch "HEAD"
00080 */
00081 
00082 namespace asdm {
00083 
00084 //class asdm::PolarizationTable;
00085 
00086         
00087 
00088 class PolarizationRow;
00089 typedef void (PolarizationRow::*PolarizationAttributeFromBin) (EndianIStream& eis);
00090 typedef void (PolarizationRow::*PolarizationAttributeFromText) (const string& s);
00091 
00098 class PolarizationRow {
00099 friend class asdm::PolarizationTable;
00100 friend class asdm::RowTransformer<PolarizationRow>;
00101 //friend class asdm::TableStreamReader<PolarizationTable, PolarizationRow>;
00102 
00103 public:
00104 
00105         virtual ~PolarizationRow();
00106 
00110         PolarizationTable &getTable() const;
00111         
00116         bool isAdded() const;
00117                 
00119         // Intrinsic Table Attributes //
00121         
00122         
00123         // ===> Attribute polarizationId
00124         
00125         
00126         
00127 
00128         
00133         Tag getPolarizationId() const;
00134         
00135  
00136         
00137         
00138         
00139         
00140 
00141 
00142         
00143         // ===> Attribute numCorr
00144         
00145         
00146         
00147 
00148         
00153         int getNumCorr() const;
00154         
00155  
00156         
00157         
00165         void setNumCorr (int numCorr);
00166                 
00167         
00168         
00169         
00170 
00171 
00172         
00173         // ===> Attribute corrType
00174         
00175         
00176         
00177 
00178         
00183         vector<StokesParameterMod::StokesParameter > getCorrType() const;
00184         
00185  
00186         
00187         
00195         void setCorrType (vector<StokesParameterMod::StokesParameter > corrType);
00196                 
00197         
00198         
00199         
00200 
00201 
00202         
00203         // ===> Attribute corrProduct
00204         
00205         
00206         
00207 
00208         
00213         vector<vector<PolarizationTypeMod::PolarizationType > > getCorrProduct() const;
00214         
00215  
00216         
00217         
00225         void setCorrProduct (vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00226                 
00227         
00228         
00229         
00230 
00231 
00233         // Extrinsic Table Attributes //
00235         
00237         // Links //
00239         
00240         
00241         
00242         
00254         bool compareNoAutoInc(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct);
00255         
00256         
00257 
00258         
00270         bool compareRequiredValue(int numCorr, vector<StokesParameterMod::StokesParameter > corrType, vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct); 
00271                  
00272         
00281         bool equalByRequiredValue(PolarizationRow* x) ;
00282         
00283 #ifndef WITHOUT_ACS
00284 
00288         asdmIDL::PolarizationRowIDL *toIDL() const;
00289 #endif
00290         
00291 #ifndef WITHOUT_ACS
00292 
00297         void setFromIDL (asdmIDL::PolarizationRowIDL x) ;
00298 #endif
00299         
00304         std::string toXML() const;
00305 
00312         void setFromXML (std::string rowDoc) ;
00313 
00316         // binary-deserialization material from an EndianIStream  //
00318 
00319         std::map<std::string, PolarizationAttributeFromBin> fromBinMethods;
00320 void polarizationIdFromBin( EndianIStream& eis);
00321 void numCorrFromBin( EndianIStream& eis);
00322 void corrTypeFromBin( EndianIStream& eis);
00323 void corrProductFromBin( EndianIStream& eis);
00324 
00325         
00326 
00334          static PolarizationRow* fromBin(EndianIStream& eis, PolarizationTable& table, const std::vector<std::string>& attributesSeq);   
00336 
00337 private:
00341         PolarizationTable &table;
00345         bool hasBeenAdded;
00346 
00347         // This method is used by the Table class when this row is added to the table.
00348         void isAdded(bool added);
00349 
00350 
00359         PolarizationRow (PolarizationTable &table);
00360 
00378          PolarizationRow (PolarizationTable &table, PolarizationRow &row);
00379                 
00381         // Intrinsic Table Attributes //
00383         
00384         
00385         // ===> Attribute polarizationId
00386         
00387         
00388 
00389         Tag polarizationId;
00390 
00391         
00392         
00393         
00403         void setPolarizationId (Tag polarizationId);
00404                 
00405         
00406 
00407         
00408         // ===> Attribute numCorr
00409         
00410         
00411 
00412         int numCorr;
00413 
00414         
00415         
00416         
00417 
00418         
00419         // ===> Attribute corrType
00420         
00421         
00422 
00423         vector<StokesParameterMod::StokesParameter > corrType;
00424 
00425         
00426         
00427         
00428 
00429         
00430         // ===> Attribute corrProduct
00431         
00432         
00433 
00434         vector<vector<PolarizationTypeMod::PolarizationType > > corrProduct;
00435 
00436         
00437         
00438         
00439 
00441         // Extrinsic Table Attributes //
00443         
00445         // Links //
00447         
00448         
00449 /*
00451         // binary-deserialization material from an EndianIStream  //
00453         std::map<std::string, PolarizationAttributeFromBin> fromBinMethods;
00454 void polarizationIdFromBin( EndianIStream& eis);
00455 void numCorrFromBin( EndianIStream& eis);
00456 void corrTypeFromBin( EndianIStream& eis);
00457 void corrProductFromBin( EndianIStream& eis);
00458 
00459         
00460 */
00461         
00463         // text-deserialization material //
00465         std::map<std::string, PolarizationAttributeFromText> fromTextMethods;
00466         
00467 void polarizationIdFromText (const string & s);
00468         
00469         
00470 void numCorrFromText (const string & s);
00471         
00472         
00473 void corrTypeFromText (const string & s);
00474         
00475         
00476 void corrProductFromText (const string & s);
00477         
00478 
00479                 
00480         
00481         void fromText(const std::string& attributeName, const std::string&  t);
00482         
00487          void toBin(EndianOSStream& eoss);
00488                  
00498 };
00499 
00500 } // End namespace asdm
00501 
00502 #endif /* Polarization_CLASS */