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.61", 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 #endif
00328         
00329 #ifndef WITHOUT_ACS
00330 
00335         void setFromIDL (asdmIDL::HolographyRowIDL x) ;
00336 #endif
00337         
00342         std::string toXML() const;
00343 
00350         void setFromXML (std::string rowDoc) ;
00351 
00354         // binary-deserialization material from an EndianIStream  //
00356 
00357         std::map<std::string, HolographyAttributeFromBin> fromBinMethods;
00358 void holographyIdFromBin( EndianIStream& eis);
00359 void distanceFromBin( EndianIStream& eis);
00360 void focusFromBin( EndianIStream& eis);
00361 void numCorrFromBin( EndianIStream& eis);
00362 void typeFromBin( EndianIStream& eis);
00363 
00364         
00365 
00373          static HolographyRow* fromBin(EndianIStream& eis, HolographyTable& table, const std::vector<std::string>& attributesSeq);       
00375 
00376 private:
00380         HolographyTable &table;
00384         bool hasBeenAdded;
00385 
00386         // This method is used by the Table class when this row is added to the table.
00387         void isAdded(bool added);
00388 
00389 
00398         HolographyRow (HolographyTable &table);
00399 
00417          HolographyRow (HolographyTable &table, HolographyRow &row);
00418                 
00420         // Intrinsic Table Attributes //
00422         
00423         
00424         // ===> Attribute holographyId
00425         
00426         
00427 
00428         Tag holographyId;
00429 
00430         
00431         
00432         
00442         void setHolographyId (Tag holographyId);
00443                 
00444         
00445 
00446         
00447         // ===> Attribute distance
00448         
00449         
00450 
00451         Length distance;
00452 
00453         
00454         
00455         
00456 
00457         
00458         // ===> Attribute focus
00459         
00460         
00461 
00462         Length focus;
00463 
00464         
00465         
00466         
00467 
00468         
00469         // ===> Attribute numCorr
00470         
00471         
00472 
00473         int numCorr;
00474 
00475         
00476         
00477         
00478 
00479         
00480         // ===> Attribute type
00481         
00482         
00483 
00484         vector<HolographyChannelTypeMod::HolographyChannelType > type;
00485 
00486         
00487         
00488         
00489 
00491         // Extrinsic Table Attributes //
00493         
00495         // Links //
00497         
00498         
00499 /*
00501         // binary-deserialization material from an EndianIStream  //
00503         std::map<std::string, HolographyAttributeFromBin> fromBinMethods;
00504 void holographyIdFromBin( EndianIStream& eis);
00505 void distanceFromBin( EndianIStream& eis);
00506 void focusFromBin( EndianIStream& eis);
00507 void numCorrFromBin( EndianIStream& eis);
00508 void typeFromBin( EndianIStream& eis);
00509 
00510         
00511 */
00512         
00514         // text-deserialization material //
00516         std::map<std::string, HolographyAttributeFromText> fromTextMethods;
00517         
00518 void holographyIdFromText (const string & s);
00519         
00520         
00521 void distanceFromText (const string & s);
00522         
00523         
00524 void focusFromText (const string & s);
00525         
00526         
00527 void numCorrFromText (const string & s);
00528         
00529         
00530 void typeFromText (const string & s);
00531         
00532 
00533                 
00534         
00535         void fromText(const std::string& attributeName, const std::string&  t);
00536         
00541          void toBin(EndianOSStream& eoss);
00542                  
00552 };
00553 
00554 } // End namespace asdm
00555 
00556 #endif /* Holography_CLASS */