casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
HolographyRow.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 HolographyRow.h
00032  */
00033  
00034 #ifndef HolographyRow_CLASS
00035 #define HolographyRow_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 #include <Length.h>
00056         
00057 
00058 
00059 
00060 
00061         
00062 
00063         
00064 
00065         
00066 
00067         
00068 
00069         
00070 #include "CHolographyChannelType.h"
00071         
00072 
00073 
00074 
00075 #include <ConversionException.h>
00076 #include <NoSuchRow.h>
00077 #include <IllegalAccessException.h>
00078 
00079 #include <RowTransformer.h>
00080 //#include <TableStreamReader.h>
00081 
00082 /*\file Holography.h
00083     \brief Generated from model's revision "1.64", branch "HEAD"
00084 */
00085 
00086 namespace asdm {
00087 
00088 //class asdm::HolographyTable;
00089 
00090         
00091 
00092 class HolographyRow;
00093 typedef void (HolographyRow::*HolographyAttributeFromBin) (EndianIStream& eis);
00094 typedef void (HolographyRow::*HolographyAttributeFromText) (const string& s);
00095 
00102 class HolographyRow {
00103 friend class asdm::HolographyTable;
00104 friend class asdm::RowTransformer<HolographyRow>;
00105 //friend class asdm::TableStreamReader<HolographyTable, HolographyRow>;
00106 
00107 public:
00108 
00109         virtual ~HolographyRow();
00110 
00114         HolographyTable &getTable() const;
00115         
00120         bool isAdded() const;
00121                 
00123         // Intrinsic Table Attributes //
00125         
00126         
00127         // ===> Attribute holographyId
00128         
00129         
00130         
00131 
00132         
00137         Tag getHolographyId() const;
00138         
00139  
00140         
00141         
00142         
00143         
00144 
00145 
00146         
00147         // ===> Attribute distance
00148         
00149         
00150         
00151 
00152         
00157         Length getDistance() const;
00158         
00159  
00160         
00161         
00169         void setDistance (Length distance);
00170                 
00171         
00172         
00173         
00174 
00175 
00176         
00177         // ===> Attribute focus
00178         
00179         
00180         
00181 
00182         
00187         Length getFocus() const;
00188         
00189  
00190         
00191         
00199         void setFocus (Length focus);
00200                 
00201         
00202         
00203         
00204 
00205 
00206         
00207         // ===> Attribute numCorr
00208         
00209         
00210         
00211 
00212         
00217         int getNumCorr() const;
00218         
00219  
00220         
00221         
00229         void setNumCorr (int numCorr);
00230                 
00231         
00232         
00233         
00234 
00235 
00236         
00237         // ===> Attribute type
00238         
00239         
00240         
00241 
00242         
00247         vector<HolographyChannelTypeMod::HolographyChannelType > getType() const;
00248         
00249  
00250         
00251         
00259         void setType (vector<HolographyChannelTypeMod::HolographyChannelType > type);
00260                 
00261         
00262         
00263         
00264 
00265 
00267         // Extrinsic Table Attributes //
00269         
00271         // Links //
00273         
00274         
00275         
00276         
00290         bool compareNoAutoInc(Length distance, Length focus, int numCorr, vector<HolographyChannelTypeMod::HolographyChannelType > type);
00291         
00292         
00293 
00294         
00308         bool compareRequiredValue(Length distance, Length focus, int numCorr, vector<HolographyChannelTypeMod::HolographyChannelType > type); 
00309                  
00310         
00319         bool equalByRequiredValue(HolographyRow* x) ;
00320         
00321 #ifndef WITHOUT_ACS
00322 
00326         asdmIDL::HolographyRowIDL *toIDL() const;
00327         
00335          void toIDL(asdmIDL::HolographyRowIDL& x) const;
00336 #endif
00337         
00338 #ifndef WITHOUT_ACS
00339 
00344         void setFromIDL (asdmIDL::HolographyRowIDL x) ;
00345 #endif
00346         
00351         std::string toXML() const;
00352 
00359         void setFromXML (std::string rowDoc) ;
00360 
00363         // binary-deserialization material from an EndianIStream  //
00365 
00366         std::map<std::string, HolographyAttributeFromBin> fromBinMethods;
00367 void holographyIdFromBin( EndianIStream& eis);
00368 void distanceFromBin( EndianIStream& eis);
00369 void focusFromBin( EndianIStream& eis);
00370 void numCorrFromBin( EndianIStream& eis);
00371 void typeFromBin( EndianIStream& eis);
00372 
00373         
00374 
00382          static HolographyRow* fromBin(EndianIStream& eis, HolographyTable& table, const std::vector<std::string>& attributesSeq);       
00383  
00390          void fromText(const std::string& attributeName, const std::string&  t);
00392 
00393 private:
00397         HolographyTable &table;
00401         bool hasBeenAdded;
00402 
00403         // This method is used by the Table class when this row is added to the table.
00404         void isAdded(bool added);
00405 
00406 
00415         HolographyRow (HolographyTable &table);
00416 
00434          HolographyRow (HolographyTable &table, HolographyRow &row);
00435                 
00437         // Intrinsic Table Attributes //
00439         
00440         
00441         // ===> Attribute holographyId
00442         
00443         
00444 
00445         Tag holographyId;
00446 
00447         
00448         
00449         
00459         void setHolographyId (Tag holographyId);
00460                 
00461         
00462 
00463         
00464         // ===> Attribute distance
00465         
00466         
00467 
00468         Length distance;
00469 
00470         
00471         
00472         
00473 
00474         
00475         // ===> Attribute focus
00476         
00477         
00478 
00479         Length focus;
00480 
00481         
00482         
00483         
00484 
00485         
00486         // ===> Attribute numCorr
00487         
00488         
00489 
00490         int numCorr;
00491 
00492         
00493         
00494         
00495 
00496         
00497         // ===> Attribute type
00498         
00499         
00500 
00501         vector<HolographyChannelTypeMod::HolographyChannelType > type;
00502 
00503         
00504         
00505         
00506 
00508         // Extrinsic Table Attributes //
00510         
00512         // Links //
00514         
00515         
00516 /*
00518         // binary-deserialization material from an EndianIStream  //
00520         std::map<std::string, HolographyAttributeFromBin> fromBinMethods;
00521 void holographyIdFromBin( EndianIStream& eis);
00522 void distanceFromBin( EndianIStream& eis);
00523 void focusFromBin( EndianIStream& eis);
00524 void numCorrFromBin( EndianIStream& eis);
00525 void typeFromBin( EndianIStream& eis);
00526 
00527         
00528 */
00529         
00531         // text-deserialization material //
00533         std::map<std::string, HolographyAttributeFromText> fromTextMethods;
00534         
00535 void holographyIdFromText (const string & s);
00536         
00537         
00538 void distanceFromText (const string & s);
00539         
00540         
00541 void focusFromText (const string & s);
00542         
00543         
00544 void numCorrFromText (const string & s);
00545         
00546         
00547 void typeFromText (const string & s);
00548         
00549 
00550                 
00551         
00556          void toBin(EndianOSStream& eoss);
00557                  
00567 };
00568 
00569 } // End namespace asdm
00570 
00571 #endif /* Holography_CLASS */